]> asedeno.scripts.mit.edu Git - linux.git/commit
vxlan: don't allow overwrite of config src addr
authorBrian Russell <brussell@brocade.com>
Fri, 24 Feb 2017 17:47:11 +0000 (17:47 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 24 Feb 2017 18:36:24 +0000 (13:36 -0500)
commit1158632b5a2dcce0786c1b1b99654e81cc867981
tree26189ec44a8a0f60e880985a9bfb7fc1c3b89896
parent7dcdf941cdc96692ab99fd790c8cc68945514851
vxlan: don't allow overwrite of config src addr

When using IPv6 transport and a default dst, a pointer to the configured
source address is passed into the route lookup. If no source address is
configured, then the value is overwritten.

IPv6 route lookup ignores egress ifindex match if the source address is set,
so if egress ifindex match is desired, the source address must be passed
as any. The overwrite breaks this for subsequent lookups.

Avoid this by copying the configured address to an existing stack variable
and pass a pointer to that instead.

Fixes: 272d96a5ab10 ("net: vxlan: lwt: Use source ip address during route lookup.")
Signed-off-by: Brian Russell <brussell@brocade.com>
Acked-by: Jiri Benc <jbenc@redhat.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan.c