Skip to content

Commit

Permalink
ipv4: remove "proto" argument from udp_tunnel_dst_lookup()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Beniamino Galvani authored and David S. Miller committed Oct 16, 2023
1 parent bf3fcbf commit 78f3655
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions drivers/net/bareudp.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);

Expand Down
2 changes: 1 addition & 1 deletion include/net/udp_tunnel.h
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions net/ipv4/udp_tunnel_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 78f3655

Please sign in to comment.