提交 9262f68d 编写于 作者: D David Ahern 提交者: Yang Yingliang

vrf: Fix IPv6 with qdisc and xfrm

stable inclusion
from linux-4.19.119
commit abc103cd536817a9c525175e561d9bbe2d610968

--------------------------------

[ Upstream commit a53c1028 ]

When a qdisc is attached to the VRF device, the packet goes down the ndo
xmit function which is setup to send the packet back to the VRF driver
which does a lookup to send the packet out. The lookup in the VRF driver
is not considering xfrm policies. Change it to use ip6_dst_lookup_flow
rather than ip6_route_output.

Fixes: 35402e31 ("net: Add IPv6 support to VRF device")
Signed-off-by: NDavid Ahern <dsahern@gmail.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
Signed-off-by: NLi Aichun <liaichun@huawei.com>
Reviewed-by: Nguodeqing <geffrey.guo@huawei.com>
Signed-off-by: NYang Yingliang <yangyingliang@huawei.com>
上级 6caea80d
...@@ -192,8 +192,8 @@ static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb, ...@@ -192,8 +192,8 @@ static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb,
fl6.flowi6_proto = iph->nexthdr; fl6.flowi6_proto = iph->nexthdr;
fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF; fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF;
dst = ip6_route_output(net, NULL, &fl6); dst = ip6_dst_lookup_flow(net, NULL, &fl6, NULL);
if (dst == dst_null) if (IS_ERR(dst) || dst == dst_null)
goto err; goto err;
skb_dst_drop(skb); skb_dst_drop(skb);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册