Skip to content

Commit

Permalink
geneve: Remove redundant socket checks.
Browse files Browse the repository at this point in the history
Geneve already has check for device socket in route
lookup function. So no need to check it in xmit
function.

Signed-off-by: Pravin B Shelar <pshelar@ovn.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
pravin shelar authored and David S. Miller committed Nov 21, 2016
1 parent c3ef5aa commit bcceeec
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions drivers/net/geneve.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
const struct ip_tunnel_key *key = &info->key;
struct rtable *rt;
int err = -EINVAL;
struct flowi4 fl4;
__u8 tos, ttl;
__be16 sport;
__be16 df;

if (!gs4)
return err;
int err;

rt = geneve_get_v4_rt(skb, dev, &fl4, info);
if (IS_ERR(rt))
Expand Down Expand Up @@ -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);
const struct ip_tunnel_key *key = &info->key;
struct dst_entry *dst = NULL;
int err = -EINVAL;
struct flowi6 fl6;
__u8 prio, ttl;
__be16 sport;

if (!gs6)
return err;
int err;

dst = geneve_get_v6_dst(skb, dev, &fl6, info);
if (IS_ERR(dst))
Expand Down

0 comments on commit bcceeec

Please sign in to comment.