Skip to content

Commit

Permalink
ixgbe: Mask off check of frag_off as we only want fragment offset
Browse files Browse the repository at this point in the history
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 <alexander.h.duyck@intel.com>
Tested-by: Phil Schmitt <phillip.j.schmitt@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Apr 18, 2013
1 parent 2551c40 commit 20967f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)))
Expand Down

0 comments on commit 20967f4

Please sign in to comment.