neigh: Don't require a dst in neigh_resolve_output
authorEric W. Biederman <ebiederm@xmission.com>
Mon, 2 Mar 2015 06:14:14 +0000 (00:14 -0600)
committerDavid S. Miller <davem@davemloft.net>
Mon, 2 Mar 2015 21:43:41 +0000 (16:43 -0500)
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>
net/core/neighbour.c

index af72b863e96887c73a05a44f1673216ea14ac973..0f48ea3affed3f53871a2ab01972b32a01c6ed31 100644 (file)
@@ -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;
@@ -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);