summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorae <ae@FreeBSD.org>2011-06-21 06:06:47 +0000
committerae <ae@FreeBSD.org>2011-06-21 06:06:47 +0000
commit17eca2a95b2419792712d24e63d751d8be06f6a8 (patch)
treed5d5b2830af603939ce230cda3fc4e87647905ab
parentd740ec2e3548be76883ec841b23261317085d6ba (diff)
downloadFreeBSD-src-17eca2a95b2419792712d24e63d751d8be06f6a8.zip
FreeBSD-src-17eca2a95b2419792712d24e63d751d8be06f6a8.tar.gz
Do not use SET_HOST_IPLEN() macro for IPv6 packets.
PR: kern/157239 MFC after: 2 weeks
-rw-r--r--sys/netinet/ipfw/ip_dn_io.c1
-rw-r--r--sys/netinet/ipfw/ip_fw_pfil.c5
2 files changed, 3 insertions, 3 deletions
diff --git a/sys/netinet/ipfw/ip_dn_io.c b/sys/netinet/ipfw/ip_dn_io.c
index bcb12ae..6766416 100644
--- a/sys/netinet/ipfw/ip_dn_io.c
+++ b/sys/netinet/ipfw/ip_dn_io.c
@@ -668,7 +668,6 @@ dummynet_send(struct mbuf *m)
break;
case DIR_OUT | PROTO_IPV6:
- SET_HOST_IPLEN(mtod(m, struct ip *));
ip6_output(m, NULL, NULL, IPV6_FORWARDING, NULL, NULL, NULL);
break;
#endif
diff --git a/sys/netinet/ipfw/ip_fw_pfil.c b/sys/netinet/ipfw/ip_fw_pfil.c
index 248e4dd..f076436 100644
--- a/sys/netinet/ipfw/ip_fw_pfil.c
+++ b/sys/netinet/ipfw/ip_fw_pfil.c
@@ -127,8 +127,9 @@ again:
args.rule = *((struct ipfw_rule_ref *)(tag+1));
m_tag_delete(*m0, tag);
if (args.rule.info & IPFW_ONEPASS) {
- SET_HOST_IPLEN(mtod(*m0, struct ip *));
- return 0;
+ if (mtod(*m0, struct ip *)->ip_v == 4)
+ SET_HOST_IPLEN(mtod(*m0, struct ip *));
+ return (0);
}
}
OpenPOWER on IntegriCloud