Skip to content

Commit

Permalink
neigh: Don't require a dst in neigh_resolve_output
Browse files Browse the repository at this point in the history
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: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Eric W. Biederman authored and David S. Miller committed Mar 2, 2015
1 parent bdf53c5 commit 435e8eb
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -1284,12 +1284,8 @@ static void neigh_hh_init(struct neighbour *n)

int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
{
struct dst_entry *dst = skb_dst(skb);
int rc = 0;

if (!dst)
goto discard;

if (!neigh_event_send(neigh, skb)) {
int err;
struct net_device *dev = neigh->dev;
Expand All @@ -1312,8 +1308,6 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb)
}
out:
return rc;
discard:
neigh_dbg(1, "%s: dst=%p neigh=%p\n", __func__, dst, neigh);
out_kfree_skb:
rc = -EINVAL;
kfree_skb(skb);
Expand Down

0 comments on commit 435e8eb

Please sign in to comment.