diff options
author | Alexander Duyck <alexander.h.duyck@intel.com> | 2013-02-01 03:56:47 -0500 |
---|---|---|
committer | Jeff Kirsher <jeffrey.t.kirsher@intel.com> | 2013-04-18 19:40:01 -0400 |
commit | b9555f6627656309c01b0c077dcecbee0ac9343f (patch) | |
tree | d83b423538bd5243c528e1fc5dc4e61ea00bcdc5 | |
parent | 5c17a203721d72c36798e5d7fa564e1adf8beb65 (diff) |
igb: 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 <alexander.h.duyck@intel.com>
Tested-by: Aaron Brown <aaron.f.brown@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r-- | drivers/net/ethernet/intel/igb/igb_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/igb/igb_main.c b/drivers/net/ethernet/intel/igb/igb_main.c index 7f83bb1e21fc..2f3dab079900 100644 --- a/drivers/net/ethernet/intel/igb/igb_main.c +++ b/drivers/net/ethernet/intel/igb/igb_main.c | |||
@@ -6472,7 +6472,7 @@ static unsigned int igb_get_headlen(unsigned char *data, | |||
6472 | return hdr.network - data; | 6472 | return hdr.network - data; |
6473 | 6473 | ||
6474 | /* record next protocol if header is present */ | 6474 | /* record next protocol if header is present */ |
6475 | if (!hdr.ipv4->frag_off) | 6475 | if (!(hdr.ipv4->frag_off & htons(IP_OFFSET))) |
6476 | nexthdr = hdr.ipv4->protocol; | 6476 | nexthdr = hdr.ipv4->protocol; |
6477 | } else if (protocol == __constant_htons(ETH_P_IPV6)) { | 6477 | } else if (protocol == __constant_htons(ETH_P_IPV6)) { |
6478 | if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr))) | 6478 | if ((hdr.network - data) > (max_len - sizeof(struct ipv6hdr))) |