summaryrefslogtreecommitdiff
path: root/include/net
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2023-10-23 08:48:57 +0100
committerDavid S. Miller <davem@davemloft.net>2023-10-23 08:48:57 +0100
commit35c1b273206346c4178928b1121675dc143e61d2 (patch)
tree3ab731fb1793437d66bc0fd19ca3ebf04f979d96 /include/net
parent92fc97ae9cfd1e8c13d973ac92d224a185056840 (diff)
parent2aceb896ee18ae35b21b14c978d8c2ef8c7b439d (diff)
downloadlinux-35c1b273206346c4178928b1121675dc143e61d2.tar.gz
linux-35c1b273206346c4178928b1121675dc143e61d2.tar.bz2
linux-35c1b273206346c4178928b1121675dc143e61d2.zip
Merge branch 'consolidate-udp-ipv6-route-lookups'
Beniamino Galvani says: ==================== net: consolidate IPv6 route lookup for UDP tunnels At the moment different UDP tunnels rely on different functions for IPv6 route lookup, and those functions all implement the same logic. Extend the generic lookup function so that it is suitable for all UDP tunnel implementations, and then adapt bareudp, geneve and vxlan to use it. This is similar to what already done for IPv4. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net')
-rw-r--r--include/net/ipv6.h6
-rw-r--r--include/net/udp_tunnel.h8
2 files changed, 8 insertions, 6 deletions
diff --git a/include/net/ipv6.h b/include/net/ipv6.h
index b3444c8a6f74..78d38dd88aba 100644
--- a/include/net/ipv6.h
+++ b/include/net/ipv6.h
@@ -1133,12 +1133,6 @@ struct dst_entry *ip6_dst_lookup_flow(struct net *net, const struct sock *sk, st
struct dst_entry *ip6_sk_dst_lookup_flow(struct sock *sk, struct flowi6 *fl6,
const struct in6_addr *final_dst,
bool connected);
-struct dst_entry *ip6_dst_lookup_tunnel(struct sk_buff *skb,
- struct net_device *dev,
- struct net *net, struct socket *sock,
- struct in6_addr *saddr,
- const struct ip_tunnel_info *info,
- u8 protocol, bool use_cache);
struct dst_entry *ip6_blackhole_route(struct net *net,
struct dst_entry *orig_dst);
diff --git a/include/net/udp_tunnel.h b/include/net/udp_tunnel.h
index 4d0578fab01a..d716214fe03d 100644
--- a/include/net/udp_tunnel.h
+++ b/include/net/udp_tunnel.h
@@ -169,6 +169,14 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
const struct ip_tunnel_key *key,
__be16 sport, __be16 dport, u8 tos,
struct dst_cache *dst_cache);
+struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb,
+ struct net_device *dev,
+ struct net *net,
+ struct socket *sock, int oif,
+ struct in6_addr *saddr,
+ const struct ip_tunnel_key *key,
+ __be16 sport, __be16 dport, u8 dsfield,
+ struct dst_cache *dst_cache);
struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
__be16 flags, __be64 tunnel_id,