Commit bcceeec3 authored by pravin shelar's avatar pravin shelar Committed by David S. Miller

geneve: Remove redundant socket checks.

Geneve already has check for device socket in route
lookup function. So no need to check it in xmit
function.
Signed-off-by: default avatarPravin B Shelar <pshelar@ovn.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent c3ef5aa5
...@@ -785,14 +785,11 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev, ...@@ -785,14 +785,11 @@ static int geneve_xmit_skb(struct sk_buff *skb, struct net_device *dev,
struct geneve_sock *gs4 = rcu_dereference(geneve->sock4); struct geneve_sock *gs4 = rcu_dereference(geneve->sock4);
const struct ip_tunnel_key *key = &info->key; const struct ip_tunnel_key *key = &info->key;
struct rtable *rt; struct rtable *rt;
int err = -EINVAL;
struct flowi4 fl4; struct flowi4 fl4;
__u8 tos, ttl; __u8 tos, ttl;
__be16 sport; __be16 sport;
__be16 df; __be16 df;
int err;
if (!gs4)
return err;
rt = geneve_get_v4_rt(skb, dev, &fl4, info); rt = geneve_get_v4_rt(skb, dev, &fl4, info);
if (IS_ERR(rt)) if (IS_ERR(rt))
...@@ -828,13 +825,10 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev, ...@@ -828,13 +825,10 @@ static int geneve6_xmit_skb(struct sk_buff *skb, struct net_device *dev,
struct geneve_sock *gs6 = rcu_dereference(geneve->sock6); struct geneve_sock *gs6 = rcu_dereference(geneve->sock6);
const struct ip_tunnel_key *key = &info->key; const struct ip_tunnel_key *key = &info->key;
struct dst_entry *dst = NULL; struct dst_entry *dst = NULL;
int err = -EINVAL;
struct flowi6 fl6; struct flowi6 fl6;
__u8 prio, ttl; __u8 prio, ttl;
__be16 sport; __be16 sport;
int err;
if (!gs6)
return err;
dst = geneve_get_v6_dst(skb, dev, &fl6, info); dst = geneve_get_v6_dst(skb, dev, &fl6, info);
if (IS_ERR(dst)) if (IS_ERR(dst))
......
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