aboutsummaryrefslogtreecommitdiffstats
path: root/sys/netinet/ip_frag.c
diff options
context:
space:
mode:
authorDarren Reed <darrenr@FreeBSD.org>2000-10-26 12:28:47 +0000
committerDarren Reed <darrenr@FreeBSD.org>2000-10-26 12:28:47 +0000
commitb13a6dbb2807ebb6dd209c8fcd7935e27a2a9668 (patch)
treeb28557f1847d347060f5950315852973200d8109 /sys/netinet/ip_frag.c
parent6adaca6e12219fdf42e3224f40ff9e27cf86f3e1 (diff)
downloadsrc-b13a6dbb2807ebb6dd209c8fcd7935e27a2a9668.tar.gz
src-b13a6dbb2807ebb6dd209c8fcd7935e27a2a9668.zip
Import IP Filter 3.4.12 into kernel source tree
Notes
Notes: svn path=/vendor-sys/ipfilter/dist-old/; revision=67611
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 5019c60ae753..1cb86c117488 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);