From: Alexander Duyck Date: Fri, 1 Feb 2013 08:56:41 +0000 (+0000) Subject: ixgbe: Mask off check of frag_off as we only want fragment offset X-Git-Tag: v3.10-rc1~66^2~99^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=20967f42025f50e8497e6d71259ac5fb56655736;p=platform%2Fkernel%2Flinux-3.10.git ixgbe: Mask off check of frag_off as we only want fragment offset We were incorrectly checking the entire frag_off field when we only wanted the fragment offset. As a result we were not pulling in TCP headers when the DNF flag was set. To correct that we will now check for frag off using the IP_OFFSET mask. Signed-off-by: Alexander Duyck Tested-by: Phil Schmitt Signed-off-by: Jeff Kirsher --- diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index 1339932..d473a7c0 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -1337,7 +1337,7 @@ static unsigned int ixgbe_get_headlen(unsigned char *data, return hdr.network - data; /* record next protocol if header is present */ - if (!hdr.ipv4->frag_off) + if (!(hdr.ipv4->frag_off & htons(IP_OFFSET))) nexthdr = hdr.ipv4->protocol; } else if (protocol == __constant_htons(ETH_P_IPV6)) { if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr)))