vrf: Check skb for XFRM_TRANSFORMED flag
authorDavid Ahern <dsahern@gmail.com>
Mon, 20 Apr 2020 23:13:52 +0000 (17:13 -0600)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 29 Apr 2020 14:33:11 +0000 (16:33 +0200)
commitb1bcb485dd6b3644d9c5323e8cf93300cb98a28a
tree17b95fcfd049296f8536ae6b9815b3cf1c3c5a57
parentdfbbb4557af4db25fc04ae1f2f2fc624493c507e
vrf: Check skb for XFRM_TRANSFORMED flag

[ Upstream commit 16b9db1ce34ff00d6c18e82825125cfef0cdfb13 ]

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: 193125dbd8eb ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/net/vrf.c