The function is now UDP-specific, the protocol is always IPPROTO_UDP.
This is similar to what already done for IPv4 in commit
78f3655adcb5
("ipv4: remove "proto" argument from udp_tunnel_dst_lookup()").
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>
return -ESHUTDOWN;
dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock, &saddr, info,
- IPPROTO_UDP, use_cache);
+ use_cache);
if (IS_ERR(dst))
return PTR_ERR(dst);
struct socket *sock = rcu_dereference(bareudp->sock);
dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock,
- &saddr, info, IPPROTO_UDP,
- use_cache);
+ &saddr, info, use_cache);
if (IS_ERR(dst))
return PTR_ERR(dst);
struct socket *sock,
struct in6_addr *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,
* @sock: Socket which provides route info
* @saddr: Memory to store the src ip address
* @info: Tunnel information
- * @protocol: IP protocol
* @use_cache: Flag to enable cache usage
* This function performs a route lookup on a UDP tunnel
*
struct socket *sock,
struct in6_addr *saddr,
const struct ip_tunnel_info *info,
- u8 protocol,
bool use_cache)
{
struct dst_entry *dst = NULL;
#endif
memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_mark = skb->mark;
- fl6.flowi6_proto = protocol;
+ fl6.flowi6_proto = IPPROTO_UDP;
fl6.daddr = info->key.u.ipv6.dst;
fl6.saddr = info->key.u.ipv6.src;
prio = info->key.tos;