summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSowmini Varadhan <sowmini.varadhan@oracle.com>2016-10-24 15:36:38 -0700
committerJeff Kirsher <jeffrey.t.kirsher@intel.com>2016-11-04 17:34:49 -0700
commit520288218cf233f442aa815496a95622c2672c62 (patch)
treea3fccd379b750895bf86b44040c4709de4745b5c
parent5f1c3589b0f0feb2c99b985d3a3bbda0dd790626 (diff)
ixgbe: ixgbe_atr() should access udp_hdr(skb) only for UDP packets
Commit 9f12df906cd8 ("ixgbe: Store VXLAN port number in network order") incorrectly checks for hdr.ipv4->protocol != IPPROTO_UDP in ixgbe_atr(). This check should be for "==" instead. Signed-off-by: Sowmini Varadhan <sowmini.varadhan@oracle.com> Reviewed-by: Alexander Duyck <alexander.h.duyck@intel.com> Tested-by: Krishneil Singh <krishneil.k.singh@intel.com> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
-rw-r--r--drivers/net/ethernet/intel/ixgbe/ixgbe_main.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
index a582bea145b3..e4a3227cd74b 100644
--- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
+++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c
@@ -7662,7 +7662,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring,
hdr.network = skb_network_header(skb);
if (skb->encapsulation &&
first->protocol == htons(ETH_P_IP) &&
- hdr.ipv4->protocol != IPPROTO_UDP) {
+ hdr.ipv4->protocol == IPPROTO_UDP) {
struct ixgbe_adapter *adapter = q_vector->adapter;
/* verify the port is recognized as VXLAN */