vrf: Check skb for XFRM_TRANSFORMED flag
authorDavid Ahern <dsahern@gmail.com>
Mon, 20 Apr 2020 23:13:52 +0000 (17:13 -0600)
committerDavid S. Miller <davem@davemloft.net>
Wed, 22 Apr 2020 19:32:11 +0000 (12:32 -0700)
commitbeef189fc7c3d93ff462f06463835a57351f2025
tree0b80f20d78ad1ba90372a5c1c0711006807788b2
parent960a0a7543d872b906e5c2c914fc4b6e6af75e63
vrf: Check skb for XFRM_TRANSFORMED flag

To avoid a loop with qdiscs and xfrms, check if the skb has already gone
through the qdisc attached to the VRF device and then to the xfrm layer.
If so, no need for a second redirect.

Fixes: 2c44df3f81da ("net: Introduce VRF device driver")
Reported-by: Trev Larock <trev@larock.ca>
Signed-off-by: David Ahern <dsahern@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vrf.c