vxlan: use generic function for tunnel IPv4 route lookup
authorBeniamino Galvani <b.galvani@gmail.com>
Mon, 16 Oct 2023 07:15:26 +0000 (09:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2023 08:57:52 +0000 (09:57 +0100)
commit6f19b2c136d98a84d79030b53e23d405edfdc783
tree7a3fa61ef9e07cd1954083288aaf84131dbd1e39
parentdaa2ba7ed1d13740c1fb56533990f510ed973612
vxlan: use generic function for tunnel IPv4 route lookup

The route lookup can be done now via generic function
udp_tunnel_dst_lookup() to replace the custom implementations in
vxlan_get_route().

Note that this patch only touches IPv4, while IPv6 still uses
vxlan6_get_route(). After IPv6 route lookup gets converted as well,
vxlan_xmit_one() can be simplified by removing local variables that
will be passed via "struct ip_tunnel_key", such as remote_ip,
local_ip, flow_flags, label.

Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/vxlan/vxlan_core.c