diff options
| author | Eric W. Biederman <ebiederm@xmission.com> | 2015-03-02 01:14:14 -0500 |
|---|---|---|
| committer | David S. Miller <davem@davemloft.net> | 2015-03-02 16:43:41 -0500 |
| commit | 435e8eb27edb4da0b47b9b980239bd59057a7362 (patch) | |
| tree | 56316bfd883fa759f7a6fc7744088028b64e7b85 /net/core | |
| parent | bdf53c58490bb52e17636eca8ad18d2c38ec3cb8 (diff) | |
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: "Eric W. Biederman" <ebiederm@xmission.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
| -rw-r--r-- | net/core/neighbour.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/core/neighbour.c b/net/core/neighbour.c index af72b863e968..0f48ea3affed 100644 --- a/net/core/neighbour.c +++ b/net/core/neighbour.c | |||
| @@ -1284,12 +1284,8 @@ static void neigh_hh_init(struct neighbour *n) | |||
| 1284 | 1284 | ||
| 1285 | int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) | 1285 | int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) |
| 1286 | { | 1286 | { |
| 1287 | struct dst_entry *dst = skb_dst(skb); | ||
| 1288 | int rc = 0; | 1287 | int rc = 0; |
| 1289 | 1288 | ||
| 1290 | if (!dst) | ||
| 1291 | goto discard; | ||
| 1292 | |||
| 1293 | if (!neigh_event_send(neigh, skb)) { | 1289 | if (!neigh_event_send(neigh, skb)) { |
| 1294 | int err; | 1290 | int err; |
| 1295 | struct net_device *dev = neigh->dev; | 1291 | struct net_device *dev = neigh->dev; |
| @@ -1312,8 +1308,6 @@ int neigh_resolve_output(struct neighbour *neigh, struct sk_buff *skb) | |||
| 1312 | } | 1308 | } |
| 1313 | out: | 1309 | out: |
| 1314 | return rc; | 1310 | return rc; |
| 1315 | discard: | ||
| 1316 | neigh_dbg(1, "%s: dst=%p neigh=%p\n", __func__, dst, neigh); | ||
| 1317 | out_kfree_skb: | 1311 | out_kfree_skb: |
| 1318 | rc = -EINVAL; | 1312 | rc = -EINVAL; |
| 1319 | kfree_skb(skb); | 1313 | kfree_skb(skb); |
