]> git.baikalelectronics.ru Git - kernel.git/commit
vrf: Reset IPCB/IP6CB when processing outbound pkts in vrf dev xmit
authorStephen Suryaputra <ssuryaextr@gmail.com>
Tue, 30 Nov 2021 16:26:37 +0000 (11:26 -0500)
committerJakub Kicinski <kuba@kernel.org>
Thu, 2 Dec 2021 03:03:13 +0000 (19:03 -0800)
commit7ab2a2f039c16a92de990b56880fd3d0c3ed4317
tree2a29296590c16e3f8fdd244e230b92eff0907c89
parentad827e22a2abcf1f7e560894fdbf4e3dbfccb6d3
vrf: Reset IPCB/IP6CB when processing outbound pkts in vrf dev xmit

IPCB/IP6CB need to be initialized when processing outbound v4 or v6 pkts
in the codepath of vrf device xmit function so that leftover garbage
doesn't cause futher code that uses the CB to incorrectly process the
pkt.

One occasion of the issue might occur when MPLS route uses the vrf
device as the outgoing device such as when the route is added using "ip
-f mpls route add <label> dev <vrf>" command.

The problems seems to exist since day one. Hence I put the day one
commits on the Fixes tags.

Fixes: 9c5f942f99b3 ("net: Introduce VRF device driver")
Fixes: d338be79af90 ("net: Add IPv6 support to VRF device")
Cc: stable@vger.kernel.org
Signed-off-by: Stephen Suryaputra <ssuryaextr@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Link: https://lore.kernel.org/r/20211130162637.3249-1-ssuryaextr@gmail.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/vrf.c