summaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_frag.c
diff options
context:
space:
mode:
authordarrenr <darrenr@FreeBSD.org>2000-10-26 12:28:47 +0000
committerdarrenr <darrenr@FreeBSD.org>2000-10-26 12:28:47 +0000
commita2c4e8b33e0013658e2daedea1909758fe6d451c (patch)
treeb28557f1847d347060f5950315852973200d8109 /sys/netinet/ip_frag.c
parent180786054221f855ed812b6e0aad1df8ef0ebe5e (diff)
downloadFreeBSD-src-a2c4e8b33e0013658e2daedea1909758fe6d451c.zip
FreeBSD-src-a2c4e8b33e0013658e2daedea1909758fe6d451c.tar.gz
Import IP Filter 3.4.12 into kernel source tree
Diffstat (limited to 'sys/netinet/ip_frag.c')
-rw-r--r--sys/netinet/ip_frag.c23
1 files changed, 13 insertions, 10 deletions
diff --git a/sys/netinet/ip_frag.c b/sys/netinet/ip_frag.c
index 5019c60..1cb86c1 100644
--- a/sys/netinet/ip_frag.c
+++ b/sys/netinet/ip_frag.c
@@ -7,7 +7,7 @@
*/
#if !defined(lint)
static const char sccsid[] = "@(#)ip_frag.c 1.11 3/24/96 (C) 1993-2000 Darren Reed";
-static const char rcsid[] = "@(#)$Id: ip_frag.c,v 2.10.2.4 2000/06/06 15:49:15 darrenr Exp $";
+static const char rcsid[] = "@(#)$Id: ip_frag.c,v 2.10.2.5 2000/10/19 15:39:58 darrenr Exp $";
#endif
#if defined(KERNEL) && !defined(_KERNEL)
@@ -214,7 +214,7 @@ u_int pass;
ipfr_t *ipf;
if ((ip->ip_v != 4) || (fr_frag_lock))
- return NULL;
+ return -1;
WRITE_ENTER(&ipf_frag);
ipf = ipfr_new(ip, fin, pass, ipfr_heads);
RWLOCK_EXIT(&ipf_frag);
@@ -231,7 +231,7 @@ nat_t *nat;
ipfr_t *ipf;
if ((ip->ip_v != 4) || (fr_frag_lock))
- return NULL;
+ return -1;
WRITE_ENTER(&ipf_natfrag);
ipf = ipfr_new(ip, fin, pass, ipfr_nattab);
if (ipf != NULL) {
@@ -328,13 +328,16 @@ fr_info_t *fin;
ipf = ipfr_lookup(ip, fin, ipfr_nattab);
if (ipf != NULL) {
nat = ipf->ipfr_data;
- /*
- * This is the last fragment for this packet.
- */
- if ((ipf->ipfr_ttl == 1) && (nat != NULL)) {
- nat->nat_data = NULL;
- ipf->ipfr_data = NULL;
- }
+ if (nat->nat_ifp == fin->fin_ifp) {
+ /*
+ * This is the last fragment for this packet.
+ */
+ if ((ipf->ipfr_ttl == 1) && (nat != NULL)) {
+ nat->nat_data = NULL;
+ ipf->ipfr_data = NULL;
+ }
+ } else
+ nat = NULL;
} else
nat = NULL;
RWLOCK_EXIT(&ipf_natfrag);
OpenPOWER on IntegriCloud