diff options
author | Beniamino Galvani <b.galvani@gmail.com> | 2023-10-16 10:15:20 +0300 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2023-10-16 11:57:52 +0300 |
commit | bf3fcbf7e7a08015d3b169bad6281b29d45c272d (patch) | |
tree | 0dec4c3ede0bbfbea8217ac887e4b0a0f15abb91 /include | |
parent | 3c4fe89878feb57bea6ad9f14997298fddf8dc10 (diff) | |
download | linux-bf3fcbf7e7a08015d3b169bad6281b29d45c272d.tar.xz |
ipv4: rename and move ip_route_output_tunnel()
At the moment ip_route_output_tunnel() is used only by bareudp.
Ideally, other UDP tunnel implementations should use it, but to do so
the function needs to accept new parameters that are specific for UDP
tunnels, such as the ports.
Prepare for these changes by renaming the function to
udp_tunnel_dst_lookup() and move it to file
net/ipv4/udp_tunnel_core.c.
Suggested-by: Guillaume Nault <gnault@redhat.com>
Signed-off-by: Beniamino Galvani <b.galvani@gmail.com>
Reviewed-by: David Ahern <dsahern@kernel.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r-- | include/net/route.h | 6 | ||||
-rw-r--r-- | include/net/udp_tunnel.h | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/include/net/route.h b/include/net/route.h index 5c248a8e3d0e..980ab474eabd 100644 --- a/include/net/route.h +++ b/include/net/route.h @@ -136,12 +136,6 @@ static inline struct rtable *__ip_route_output_key(struct net *net, struct rtable *ip_route_output_flow(struct net *, struct flowi4 *flp, const struct sock *sk); -struct rtable *ip_route_output_tunnel(struct sk_buff *skb, - struct net_device *dev, - struct net *net, __be32 *saddr, - const struct ip_tunnel_info *info, - u8 protocol, bool use_cache); - struct dst_entry *ipv4_blackhole_route(struct net *net, struct dst_entry *dst_orig); diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h index 21ba0a25f936..11e810ca5088 100644 --- a/include/net/udp_tunnel.h +++ b/include/net/udp_tunnel.h @@ -162,6 +162,12 @@ int udp_tunnel6_xmit_skb(struct dst_entry *dst, struct sock *sk, void udp_tunnel_sock_release(struct socket *sock); +struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb, + struct net_device *dev, + struct net *net, __be32 *saddr, + const struct ip_tunnel_info *info, + u8 protocol, bool use_cache); + struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family, __be16 flags, __be64 tunnel_id, int md_size); |