Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-1-5]: src/sys/netinet Apply patch (requested by darrenr):



details:   https://anonhg.NetBSD.org/src/rev/970181672f87
branches:  netbsd-1-5
changeset: 492907:970181672f87
user:      he <he%NetBSD.org@localhost>
date:      Tue Feb 26 22:25:16 2002 +0000

description:
Apply patch (requested by darrenr):
  Prevent panic when packets are received in a certain order.

diffstat:

 sys/netinet/ip_nat.c |  8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)

diffs (36 lines):

diff -r ddf2d15ad8fc -r 970181672f87 sys/netinet/ip_nat.c
--- a/sys/netinet/ip_nat.c      Tue Feb 26 22:12:50 2002 +0000
+++ b/sys/netinet/ip_nat.c      Tue Feb 26 22:25:16 2002 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.c,v 1.34.2.4 2002/02/09 16:59:16 he Exp $       */
+/*     $NetBSD: ip_nat.c,v 1.34.2.5 2002/02/26 22:25:16 he Exp $       */
 
 /*
  * Copyright (C) 1995-2001 by Darren Reed.
@@ -110,7 +110,7 @@
 #if !defined(lint)
 #if defined(__NetBSD__)
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.34.2.4 2002/02/09 16:59:16 he Exp $");
+__KERNEL_RCSID(0, "$NetBSD: ip_nat.c,v 1.34.2.5 2002/02/26 22:25:16 he Exp $");
 #else
 static const char sccsid[] = "@(#)ip_nat.c     1.11 6/5/96 (C) 1995 Darren Reed";
 static const char rcsid[] = "@(#)Id: ip_nat.c,v 2.37.2.58 2002/01/02 03:40:24 darrenr Exp";
@@ -2445,7 +2445,7 @@
 
                if ((fin->fin_off == 0) && !(fin->fin_fl & FI_SHORT)) {
 
-                       if ((nat->nat_outport != 0) && (nflags & IPN_TCPUDP)) {
+                       if ((nat->nat_outport != 0) && (tcp != NULL)) {
                                tcp->th_sport = nat->nat_outport;
                                fin->fin_data[0] = ntohs(tcp->th_sport);
                        }
@@ -2654,7 +2654,7 @@
 #endif
                if ((fin->fin_off == 0) && !(fin->fin_fl & FI_SHORT)) {
 
-                       if ((nat->nat_inport != 0) && (nflags & IPN_TCPUDP)) {
+                       if ((nat->nat_inport != 0) && (tcp != NULL)) {
                                tcp->th_dport = nat->nat_inport;
                                fin->fin_data[1] = ntohs(tcp->th_dport);
                        }



Home | Main Index | Thread Index | Old Index