diff options
author | sumikawa <sumikawa@FreeBSD.org> | 2001-10-29 07:55:57 +0000 |
---|---|---|
committer | sumikawa <sumikawa@FreeBSD.org> | 2001-10-29 07:55:57 +0000 |
commit | 6a5252c5e103d15fd7485104525a97622ba8397d (patch) | |
tree | 09372582487dd074c85ca03d9bb216d51c67f9cf /sys/netinet6 | |
parent | 2a8a0474b8b86f0d492d9b722fb90ef2af2dc729 (diff) | |
download | FreeBSD-src-6a5252c5e103d15fd7485104525a97622ba8397d.zip FreeBSD-src-6a5252c5e103d15fd7485104525a97622ba8397d.tar.gz |
Fix fragmented packet handling.
Obtained from: KAME
MFC after: 3 weeks
Diffstat (limited to 'sys/netinet6')
-rw-r--r-- | sys/netinet6/ip6_fw.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/netinet6/ip6_fw.c b/sys/netinet6/ip6_fw.c index c932539..5f60716 100644 --- a/sys/netinet6/ip6_fw.c +++ b/sys/netinet6/ip6_fw.c @@ -231,11 +231,11 @@ ip6opts_match(struct ip6_hdr **pip6, struct ip6_fw *f, struct mbuf **m, switch(*nxt) { case IPPROTO_FRAGMENT: - if ((*m)->m_len < *off + sizeof(struct ip6_frag)) { + if ((*m)->m_len >= *off + sizeof(struct ip6_frag)) { struct ip6_frag *ip6f; ip6f = (struct ip6_frag *) ((caddr_t)ip6 + *off); - *offset = ip6f->ip6f_offlg | IP6F_OFF_MASK; + *offset = ip6f->ip6f_offlg & IP6F_OFF_MASK; } opts &= ~IPV6_FW_IP6OPT_FRAG; nopts &= ~IPV6_FW_IP6OPT_FRAG; |