diff options
author | Thomas Graf <tgraf@suug.ch> | 2015-05-05 13:09:21 (GMT) |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2015-05-05 23:37:54 (GMT) |
commit | 239fb791d4ee194740e69fe9694f58ec404d1689 (patch) | |
tree | 5611069e9029644705960350fa7b61a8c7965f5b /drivers/net/vxlan.c | |
parent | b0d081c524b46c25d71b16a1101e8c80d6e8c86a (diff) | |
download | linux-239fb791d4ee194740e69fe9694f58ec404d1689.tar.xz |
vxlan: Correctly set flow*i_mark and flow4i_proto in route lookups
VXLAN must provide the skb mark and specifiy IPPROTO_UDP when doing
the FIB lookup for the remote ip. Otherwise an invalid route might
be returned.
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/vxlan.c')
-rw-r--r-- | drivers/net/vxlan.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/vxlan.c b/drivers/net/vxlan.c index 27a5f95..3517ab0a 100644 --- a/drivers/net/vxlan.c +++ b/drivers/net/vxlan.c @@ -1921,6 +1921,8 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, memset(&fl4, 0, sizeof(fl4)); fl4.flowi4_oif = rdst->remote_ifindex; fl4.flowi4_tos = RT_TOS(tos); + fl4.flowi4_mark = skb->mark; + fl4.flowi4_proto = IPPROTO_UDP; fl4.daddr = dst->sin.sin_addr.s_addr; fl4.saddr = vxlan->saddr.sin.sin_addr.s_addr; @@ -1981,6 +1983,7 @@ static void vxlan_xmit_one(struct sk_buff *skb, struct net_device *dev, fl6.flowi6_oif = rdst->remote_ifindex; fl6.daddr = dst->sin6.sin6_addr; fl6.saddr = vxlan->saddr.sin6.sin6_addr; + fl6.flowi6_mark = skb->mark; fl6.flowi6_proto = IPPROTO_UDP; if (ipv6_stub->ipv6_dst_lookup(sk, &ndst, &fl6)) { |