ipvlan: fix ipv6 outbound device
authorKeefe Liu <liuqifa@huawei.com>
Thu, 9 Nov 2017 12:09:31 +0000 (20:09 +0800)
committerDavid S. Miller <davem@davemloft.net>
Sat, 11 Nov 2017 10:27:05 +0000 (19:27 +0900)
When process the outbound packet of ipv6, we should assign the master
device to output device other than input device.

Signed-off-by: Keefe Liu <liuqifa@huawei.com>
Acked-by: Mahesh Bandewar <maheshb@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ipvlan/ipvlan_core.c

index 034ae4c57196216fd2d5f928cbada3e8aaaf97e1..f2a7e929316e12e86e680468f44a36612d69f5df 100644 (file)
@@ -409,7 +409,7 @@ static int ipvlan_process_v6_outbound(struct sk_buff *skb)
        struct dst_entry *dst;
        int err, ret = NET_XMIT_DROP;
        struct flowi6 fl6 = {
-               .flowi6_iif = dev->ifindex,
+               .flowi6_oif = dev->ifindex,
                .daddr = ip6h->daddr,
                .saddr = ip6h->saddr,
                .flowi6_flags = FLOWI_FLAG_ANYSRC,