ipv4: remove "proto" argument from udp_tunnel_dst_lookup()
authorBeniamino Galvani <b.galvani@gmail.com>
Mon, 16 Oct 2023 07:15:21 +0000 (09:15 +0200)
committerDavid S. Miller <davem@davemloft.net>
Mon, 16 Oct 2023 08:57:52 +0000 (09:57 +0100)
The function is now UDP-specific, the protocol is always IPPROTO_UDP.

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>
drivers/net/bareudp.c
include/net/udp_tunnel.h
net/ipv4/udp_tunnel_core.c

index 63fc32fa1af5d7bb6cd38772736a4201b9d44063..6af67cac6bde059d4a9ec4ddf95737e4c4126958 100644 (file)
@@ -307,7 +307,7 @@ static int bareudp_xmit_skb(struct sk_buff *skb, struct net_device *dev,
                return -ESHUTDOWN;
 
        rt = udp_tunnel_dst_lookup(skb, dev, bareudp->net, &saddr, info,
-                                  IPPROTO_UDP, use_cache);
+                                  use_cache);
 
        if (IS_ERR(rt))
                return PTR_ERR(rt);
@@ -484,7 +484,7 @@ static int bareudp_fill_metadata_dst(struct net_device *dev,
                __be32 saddr;
 
                rt = udp_tunnel_dst_lookup(skb, dev, bareudp->net, &saddr,
-                                          info, IPPROTO_UDP, use_cache);
+                                          info, use_cache);
                if (IS_ERR(rt))
                        return PTR_ERR(rt);
 
index 11e810ca508880dbccf600bba473ff332b1dd672..8f110dbd3784ea770078c784e6a16357eeb55404 100644 (file)
@@ -166,7 +166,7 @@ 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);
+                                    bool use_cache);
 
 struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
                                    __be16 flags, __be64 tunnel_id,
index 96f93f92b6cedf283ca59e094583e8bb8d4ec0d4..9b0cfd72d5fda8697f07323340804c6c724649e2 100644 (file)
@@ -208,7 +208,7 @@ 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)
+                                    bool use_cache)
 {
 #ifdef CONFIG_DST_CACHE
        struct dst_cache *dst_cache;
@@ -227,7 +227,7 @@ struct rtable *udp_tunnel_dst_lookup(struct sk_buff *skb,
 #endif
        memset(&fl4, 0, sizeof(fl4));
        fl4.flowi4_mark = skb->mark;
-       fl4.flowi4_proto = protocol;
+       fl4.flowi4_proto = IPPROTO_UDP;
        fl4.daddr = info->key.u.ipv4.dst;
        fl4.saddr = info->key.u.ipv4.src;
        tos = info->key.tos;