Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Thomas Graf and committed by
David S. Miller
239fb791 b0d081c5

+3
+3
drivers/net/vxlan.c
··· 1921 1921 memset(&fl4, 0, sizeof(fl4)); 1922 1922 fl4.flowi4_oif = rdst->remote_ifindex; 1923 1923 fl4.flowi4_tos = RT_TOS(tos); 1924 + fl4.flowi4_mark = skb->mark; 1925 + fl4.flowi4_proto = IPPROTO_UDP; 1924 1926 fl4.daddr = dst->sin.sin_addr.s_addr; 1925 1927 fl4.saddr = vxlan->saddr.sin.sin_addr.s_addr; 1926 1928 ··· 1983 1981 fl6.flowi6_oif = rdst->remote_ifindex; 1984 1982 fl6.daddr = dst->sin6.sin6_addr; 1985 1983 fl6.saddr = vxlan->saddr.sin6.sin6_addr; 1984 + fl6.flowi6_mark = skb->mark; 1986 1985 fl6.flowi6_proto = IPPROTO_UDP; 1987 1986 1988 1987 if (ipv6_stub->ipv6_dst_lookup(sk, &ndst, &fl6)) {