Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 20 Aug 2011 13:47:08 +0000 (UTC)
From:      "Bjoern A. Zeeb" <bz@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r225034 - head/sys/netinet/ipfw
Message-ID:  <201108201347.p7KDl8SA054310@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: bz
Date: Sat Aug 20 13:47:08 2011
New Revision: 225034
URL: http://svn.freebsd.org/changeset/base/225034

Log:
  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)

Modified:
  head/sys/netinet/ipfw/ip_fw_log.c

Modified: head/sys/netinet/ipfw/ip_fw_log.c
==============================================================================
--- head/sys/netinet/ipfw/ip_fw_log.c	Sat Aug 20 13:46:19 2011	(r225033)
+++ head/sys/netinet/ipfw/ip_fw_log.c	Sat Aug 20 13:47:08 2011	(r225034)
@@ -333,10 +333,14 @@ ipfw_log(struct ip_fw *f, u_int hlen, st
 #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, st
 				    " (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
 		{



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201108201347.p7KDl8SA054310>