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 Pull up revision 1.39 (requested by darrenr):



details:   https://anonhg.NetBSD.org/src/rev/be86f5ef3be6
branches:  netbsd-1-5
changeset: 491241:be86f5ef3be6
user:      he <he%NetBSD.org@localhost>
date:      Sat Apr 14 20:57:01 2001 +0000

description:
Pull up revision 1.39 (requested by darrenr):
  Fix bug related to fragment cache handling.

diffstat:

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

diffs (38 lines):

diff -r 653f5f01e24e -r be86f5ef3be6 sys/netinet/ip_nat.c
--- a/sys/netinet/ip_nat.c      Sat Apr 14 20:56:42 2001 +0000
+++ b/sys/netinet/ip_nat.c      Sat Apr 14 20:57:01 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: ip_nat.c,v 1.34.2.2 2000/08/31 14:58:06 veego Exp $    */
+/*     $NetBSD: ip_nat.c,v 1.34.2.3 2001/04/14 20:57:01 he Exp $       */
 
 /*
  * Copyright (C) 1995-2000 by Darren Reed.
@@ -11,7 +11,7 @@
  */
 #if !defined(lint)
 #if defined(__NetBSD__)
-static const char rcsid[] = "$NetBSD: ip_nat.c,v 1.34.2.2 2000/08/31 14:58:06 veego Exp $";
+static const char rcsid[] = "$NetBSD: ip_nat.c,v 1.34.2.3 2001/04/14 20:57:01 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.20 2000/08/08 16:01:01 darrenr Exp";
@@ -1924,7 +1924,8 @@
 
        if (nat) {
                np = nat->nat_ptr;
-               if (natadd && fin->fin_fi.fi_fl & FI_FRAG)
+               if (natadd && (fin->fin_fi.fi_fl & FI_FRAG) &&
+                   np && (np->in_flags & IPN_FRAG))
                        ipfr_nat_newfrag(ip, fin, 0, nat);
                MUTEX_ENTER(&nat->nat_lock);
                nat->nat_age = fr_defnatage;
@@ -2128,7 +2129,8 @@
        if (nat) {
                np = nat->nat_ptr;
                fin->fin_fr = nat->nat_fr;
-               if (natadd && fin->fin_fi.fi_fl & FI_FRAG)
+               if (natadd && (fin->fin_fi.fi_fl & FI_FRAG) &&
+                   np && (np->in_flags & IPN_FRAG))
                        ipfr_nat_newfrag(ip, fin, 0, nat);
                if ((np->in_apr != NULL) && (np->in_dport == 0 ||
                    (tcp != NULL && sport == np->in_dport))) {



Home | Main Index | Thread Index | Old Index