summaryrefslogtreecommitdiff
path: root/sys/netinet6
diff options
context:
space:
mode:
authorJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-02-16 08:50:24 +0000
committerJun-ichiro itojun Hagino <itojun@cvs.openbsd.org>2001-02-16 08:50:24 +0000
commit3fe2ea83f153fd4de002a477cd53dec187b4f856 (patch)
treebe451b60a49170eb6cf7b23d07c53fce0345fe78 /sys/netinet6
parent41cf0b2cea14664135034f692a0f422de8d6c48a (diff)
set frag6_doing_reass while doing reass, to help frag6_drain.
Diffstat (limited to 'sys/netinet6')
-rw-r--r--sys/netinet6/frag6.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys/netinet6/frag6.c b/sys/netinet6/frag6.c
index 334eb2fd37a..076f5ddd6eb 100644
--- a/sys/netinet6/frag6.c
+++ b/sys/netinet6/frag6.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: frag6.c,v 1.7 2001/02/16 08:48:05 itojun Exp $ */
+/* $OpenBSD: frag6.c,v 1.8 2001/02/16 08:50:23 itojun Exp $ */
/* $KAME: frag6.c,v 1.28 2000/12/12 10:54:06 itojun Exp $ */
/*
@@ -51,10 +51,10 @@
#include <netinet6/ip6_var.h>
#include <netinet/icmp6.h>
-#include <net/net_osdep.h>
-
#include <dev/rndvar.h>
+#include <net/net_osdep.h>
+
/*
* Define it to get a correct behavior on per-interface statistics.
* You will need to perform an extra routing table lookup, per fragment,
@@ -74,7 +74,7 @@ struct ip6q ip6q; /* ip6 reassemble queue */
#ifndef offsetof /* XXX */
#define offsetof(type, member) ((size_t)(&((type *)0)->member))
-#endif
+#endif
/*
* Initialise reassembly queue and fragment identifier.
@@ -202,6 +202,8 @@ frag6_input(mp, offp, proto)
/* offset now points to data portion */
offset += sizeof(struct ip6_frag);
+ frag6_doing_reass = 1;
+
for (q6 = ip6q.ip6q_next; q6 != &ip6q; q6 = q6->ip6q_next)
if (ip6f->ip6f_ident == q6->ip6q_ident &&
IN6_ARE_ADDR_EQUAL(&ip6->ip6_src, &q6->ip6q_src) &&
@@ -270,6 +272,7 @@ frag6_input(mp, offp, proto)
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
offset - sizeof(struct ip6_frag) +
offsetof(struct ip6_frag, ip6f_offlg));
+ frag6_doing_reass = 0;
return(IPPROTO_DONE);
}
}
@@ -277,6 +280,7 @@ frag6_input(mp, offp, proto)
icmp6_error(m, ICMP6_PARAM_PROB, ICMP6_PARAMPROB_HEADER,
offset - sizeof(struct ip6_frag) +
offsetof(struct ip6_frag, ip6f_offlg));
+ frag6_doing_reass = 0;
return(IPPROTO_DONE);
}
/*
@@ -521,6 +525,7 @@ insert:
in6_ifstat_inc(dstifp, ifs6_reass_fail);
ip6stat.ip6s_fragdropped++;
m_freem(m);
+ frag6_doing_reass = 0;
return IPPROTO_DONE;
}
@@ -619,9 +624,6 @@ frag6_slowtimo()
{
struct ip6q *q6;
int s = splnet();
-#if 0
- extern struct route_in6 ip6_forward_rt;
-#endif
frag6_doing_reass = 1;
q6 = ip6q.ip6q_next;