diff options
author | bz <bz@FreeBSD.org> | 2011-08-20 13:47:08 +0000 |
---|---|---|
committer | bz <bz@FreeBSD.org> | 2011-08-20 13:47:08 +0000 |
commit | 230977d3550e0d09219f834245733469001ae919 (patch) | |
tree | 7df14702cb92323e946f30c8a4c93e19a8f555d6 /sys/netinet | |
parent | 0ac1f49cb05b5e484263072785a85a98d2dbfe25 (diff) | |
download | FreeBSD-src-230977d3550e0d09219f834245733469001ae919.zip FreeBSD-src-230977d3550e0d09219f834245733469001ae919.tar.gz |
After r225032 fix logging in a similar way masking the the IPv6
more fragments flag off so that offset == 0 checks work properly.
PR: kern/145733
Submitted by: Matthew Luckie (mjl luckie.org.nz)
MFC after: 2 weeks
X-MFC with: r225032
Approved by: re (kib)
Diffstat (limited to 'sys/netinet')
-rw-r--r-- | sys/netinet/ipfw/ip_fw_log.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/netinet/ipfw/ip_fw_log.c b/sys/netinet/ipfw/ip_fw_log.c index 2b55a38..edfa07d 100644 --- a/sys/netinet/ipfw/ip_fw_log.c +++ b/sys/netinet/ipfw/ip_fw_log.c @@ -333,10 +333,14 @@ ipfw_log(struct ip_fw *f, u_int hlen, struct ip_fw_args *args, #ifdef INET6 struct ip6_hdr *ip6 = NULL; struct icmp6_hdr *icmp6; + u_short ip6f_mf; #endif src[0] = '\0'; dst[0] = '\0'; #ifdef INET6 + ip6f_mf = offset & IP6F_MORE_FRAG; + offset &= IP6F_OFF_MASK; + if (IS_IP6_FLOW_ID(&(args->f_id))) { char ip6buf[INET6_ADDRSTRLEN]; snprintf(src, sizeof(src), "[%s]", @@ -418,8 +422,7 @@ ipfw_log(struct ip_fw *f, u_int hlen, struct ip_fw_args *args, " (frag %08x:%d@%d%s)", args->f_id.extra, ntohs(ip6->ip6_plen) - hlen, - ntohs(offset & IP6F_OFF_MASK) << 3, - (offset & IP6F_MORE_FRAG) ? "+" : ""); + ntohs(offset) << 3, ip6f_mf ? "+" : ""); } else #endif { |