]> www.infradead.org Git - users/jedix/linux-maple.git/commit
ixgbe: Fix ATR so that it correctly handles IPv6 extension headers
authorAlexander Duyck <aduyck@mirantis.com>
Tue, 26 Jan 2016 03:39:40 +0000 (19:39 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Wed, 6 Jul 2016 23:40:55 +0000 (16:40 -0700)
commit29e9eb07554eed902cb96efe968cb09ca2e8ec33
tree0f56784f3d8bf2b965033957a256870bebad8a75
parent2bde5ff015af36ad3a37411154d7e811b0166d6a
ixgbe: Fix ATR so that it correctly handles IPv6 extension headers

Orabug: 23177316

The ATR code was assuming that it would be able to use tcp_hdr for
every TCP frame that came through.  However this isn't the case as it
is possible for a frame to arrive that is TCP but sent through something
like a raw socket.  As a result the driver was setting up bad filters in
which tcp_hdr was really pointing to the network header so the data was
all invalid.

In order to correct this I have added a bit of parsing logic that will
determine the TCP header location based off of the network header and
either the offset in the case of the IPv4 header, or a walk through the
IPv6 extension headers until it encounters the header that indicates
IPPROTO_TCP.  In addition I have added checks to verify that the lowest
protocol provided is recognized as IPv4 or IPv6 to help mitigate raw
sockets using ETH_P_ALL from having ATR applied to them.

Signed-off-by: Alexander Duyck <aduyck@mirantis.com>
Tested-by: Andrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
(cherry picked from commit e2873d43f9c607e9d855b8ae120d5990ba1722df)
Signed-off-by: Brian Maly <brian.maly@oracle.com>
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c