Skip to content

Commit a53c102

Browse files
dsaherndavem330
authored andcommitted
vrf: Fix IPv6 with qdisc and xfrm
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: 35402e3 ("net: Add IPv6 support to VRF device") Signed-off-by: David Ahern <[email protected]> Signed-off-by: David S. Miller <[email protected]>
1 parent 5cc4adb commit a53c102

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

drivers/net/vrf.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -188,8 +188,8 @@ static netdev_tx_t vrf_process_v6_outbound(struct sk_buff *skb,
188188
fl6.flowi6_proto = iph->nexthdr;
189189
fl6.flowi6_flags = FLOWI_FLAG_SKIP_NH_OIF;
190190

191-
dst = ip6_route_output(net, NULL, &fl6);
192-
if (dst == dst_null)
191+
dst = ip6_dst_lookup_flow(net, NULL, &fl6, NULL);
192+
if (IS_ERR(dst) || dst == dst_null)
193193
goto err;
194194

195195
skb_dst_drop(skb);

0 commit comments

Comments
 (0)