From 62b67a21f55d9eb78884e9657ea74a90ad809c2b Mon Sep 17 00:00:00 2001 From: Sowmini Varadhan Date: Mon, 24 Oct 2016 15:36:38 -0700 Subject: [PATCH] ixgbe: ixgbe_atr() should access udp_hdr(skb) only for UDP packets Orabug: 24568240 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 Reviewed-by: Alexander Duyck Tested-by: Krishneil Singh Signed-off-by: Jeff Kirsher (cherry picked from commit 520288218cf233f442aa815496a95622c2672c62) Signed-off-by: Brian Maly --- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c index cc223dcb3fbc..ac0013936a07 100644 --- a/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +++ b/drivers/net/ethernet/intel/ixgbe/ixgbe_main.c @@ -7677,7 +7677,7 @@ static void ixgbe_atr(struct ixgbe_ring *ring, #ifdef CONFIG_IXGBE_VXLAN 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 */ -- 2.50.1