Commit 7e937dcf authored by Beniamino Galvani's avatar Beniamino Galvani Committed by David S. Miller

ipv6: remove "proto" argument from udp_tunnel6_dst_lookup()

The function is now UDP-specific, the protocol is always IPPROTO_UDP.

This is similar to what already done for IPv4 in commit 78f3655a
("ipv4: remove "proto" argument from udp_tunnel_dst_lookup()").
Suggested-by: default avatarGuillaume Nault <gnault@redhat.com>
Signed-off-by: default avatarBeniamino Galvani <b.galvani@gmail.com>
Reviewed-by: default avatarDavid Ahern <dsahern@kernel.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent fc47e86d
...@@ -372,7 +372,7 @@ static int bareudp6_xmit_skb(struct sk_buff *skb, struct net_device *dev, ...@@ -372,7 +372,7 @@ static int bareudp6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
return -ESHUTDOWN; return -ESHUTDOWN;
dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock, &saddr, info, dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock, &saddr, info,
IPPROTO_UDP, use_cache); use_cache);
if (IS_ERR(dst)) if (IS_ERR(dst))
return PTR_ERR(dst); return PTR_ERR(dst);
...@@ -499,8 +499,7 @@ static int bareudp_fill_metadata_dst(struct net_device *dev, ...@@ -499,8 +499,7 @@ static int bareudp_fill_metadata_dst(struct net_device *dev,
struct socket *sock = rcu_dereference(bareudp->sock); struct socket *sock = rcu_dereference(bareudp->sock);
dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock, dst = udp_tunnel6_dst_lookup(skb, dev, bareudp->net, sock,
&saddr, info, IPPROTO_UDP, &saddr, info, use_cache);
use_cache);
if (IS_ERR(dst)) if (IS_ERR(dst))
return PTR_ERR(dst); return PTR_ERR(dst);
......
...@@ -175,7 +175,7 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb, ...@@ -175,7 +175,7 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb,
struct socket *sock, struct socket *sock,
struct in6_addr *saddr, struct in6_addr *saddr,
const struct ip_tunnel_info *info, 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, struct metadata_dst *udp_tun_rx_dst(struct sk_buff *skb, unsigned short family,
__be16 flags, __be64 tunnel_id, __be16 flags, __be64 tunnel_id,
......
...@@ -121,7 +121,6 @@ EXPORT_SYMBOL_GPL(udp_tunnel6_xmit_skb); ...@@ -121,7 +121,6 @@ EXPORT_SYMBOL_GPL(udp_tunnel6_xmit_skb);
* @sock: Socket which provides route info * @sock: Socket which provides route info
* @saddr: Memory to store the src ip address * @saddr: Memory to store the src ip address
* @info: Tunnel information * @info: Tunnel information
* @protocol: IP protocol
* @use_cache: Flag to enable cache usage * @use_cache: Flag to enable cache usage
* This function performs a route lookup on a UDP tunnel * This function performs a route lookup on a UDP tunnel
* *
...@@ -135,7 +134,6 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb, ...@@ -135,7 +134,6 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb,
struct socket *sock, struct socket *sock,
struct in6_addr *saddr, struct in6_addr *saddr,
const struct ip_tunnel_info *info, const struct ip_tunnel_info *info,
u8 protocol,
bool use_cache) bool use_cache)
{ {
struct dst_entry *dst = NULL; struct dst_entry *dst = NULL;
...@@ -155,7 +153,7 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb, ...@@ -155,7 +153,7 @@ struct dst_entry *udp_tunnel6_dst_lookup(struct sk_buff *skb,
#endif #endif
memset(&fl6, 0, sizeof(fl6)); memset(&fl6, 0, sizeof(fl6));
fl6.flowi6_mark = skb->mark; fl6.flowi6_mark = skb->mark;
fl6.flowi6_proto = protocol; fl6.flowi6_proto = IPPROTO_UDP;
fl6.daddr = info->key.u.ipv6.dst; fl6.daddr = info->key.u.ipv6.dst;
fl6.saddr = info->key.u.ipv6.src; fl6.saddr = info->key.u.ipv6.src;
prio = info->key.tos; prio = info->key.tos;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment