diff options
author | dwmalone <dwmalone@FreeBSD.org> | 2007-12-09 15:35:09 +0000 |
---|---|---|
committer | dwmalone <dwmalone@FreeBSD.org> | 2007-12-09 15:35:09 +0000 |
commit | f0253dbb16b4d515a1828fbedc6a2df706d1fbd1 (patch) | |
tree | d721ffc397a5678396a38d723028cc2f112d501c /sys/netinet | |
parent | a233a2bd762e1c987581aac295f3fd601f3d1ea4 (diff) | |
download | FreeBSD-src-f0253dbb16b4d515a1828fbedc6a2df706d1fbd1.zip FreeBSD-src-f0253dbb16b4d515a1828fbedc6a2df706d1fbd1.tar.gz |
If we are walking the IPv6 header chain and we hit an IPPROTO_NONE
header, then don't try to pullup anything, because there is no next
header if we hit IPPROTO_NONE. Set ulp to a non-NULL value so the
search for an upper layer header terinates.
This is based on Pekka's diagnosis, but I chose a simpler fix.
PR: 115261
Submitted by: Pekka Savola <pekkas@netcore.fi>
Reviewed by: mlaier
MFC after: 2 weeks
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ip_fw2.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sys/netinet/ip_fw2.c b/sys/netinet/ip_fw2.c index 77fc59f..1c25978 100644 --- a/sys/netinet/ip_fw2.c +++ b/sys/netinet/ip_fw2.c @@ -2535,9 +2535,12 @@ do { \ break; case IPPROTO_NONE: /* RFC 2460 */ - PULLUP_TO(hlen, ulp, struct ip6_ext); - /* Packet ends here. if ip6e_len!=0 octets - * must be ignored. */ + /* + * Packet ends here, and IPv6 header has + * already been pulled up. If ip6e_len!=0 + * then octets must be ignored. + */ + ulp = ip; /* non-NULL to get out of loop. */ break; case IPPROTO_OSPFIGP: |