瀏覽代碼

ipvlan: fix ipv6 outbound device

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>
Keefe Liu 7 年之前
父節點
當前提交
ca29fd7cce
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1 1
      drivers/net/ipvlan/ipvlan_core.c

+ 1 - 1
drivers/net/ipvlan/ipvlan_core.c

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