Commit 435e8eb2 authored by Eric W. Biederman's avatar Eric W. Biederman Committed by David S. Miller

neigh: Don't require a dst in neigh_resolve_output

Having a dst helps a little bit for teql but is fundamentally
unnecessary and there are code paths where a dst is not available that
it would be nice to use the neighbour cache.
Signed-off-by: default avatar"Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent bdf53c58
...@@ -1284,12 +1284,8 @@ static void neigh_hh_init(struct neighbour *n) ...@@ -1284,12 +1284,8 @@ static void neigh_hh_init(struct neighbour *n)
int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
{ {
struct dst_entry *dst = skb_dst(skb);
int rc = 0; int rc = 0;
if (!dst)
goto discard;
if (!neigh_event_send(neigh, skb)) { if (!neigh_event_send(neigh, skb)) {
int err; int err;
struct net_device *dev = neigh->dev; struct net_device *dev = neigh->dev;
...@@ -1312,8 +1308,6 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) ...@@ -1312,8 +1308,6 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
} }
out: out:
return rc; return rc;
discard:
neigh_dbg(1, "%s: dst=%p neigh=%p\n", __func__, dst, neigh);
out_kfree_skb: out_kfree_skb:
rc = -EINVAL; rc = -EINVAL;
kfree_skb(skb); kfree_skb(skb);
......
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