Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 314973
b: refs/heads/master
c: 13a43d9
h: refs/heads/master
i:
  314971: c0e43de
v: v3
  • Loading branch information
David S. Miller committed Jul 5, 2012
1 parent 32e8360 commit 72bf35d
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: f9d751667fd60788fe3641738938e0968e99cece
refs/heads/master: 13a43d94ab026c423dc8902170ef27c2bd36aa87
19 changes: 16 additions & 3 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -1201,10 +1201,23 @@ int neigh_update(struct neighbour *neigh, const u8 *lladdr, u8 new,
write_unlock_bh(&neigh->lock);

rcu_read_lock();
/* On shaper/eql skb->dst->neighbour != neigh :( */
if (dst && (n2 = dst_get_neighbour_noref(dst)) != NULL)
n1 = n2;

/* Why not just use 'neigh' as-is? The problem is that
* things such as shaper, eql, and sch_teql can end up
* using alternative, different, neigh objects to output
* the packet in the output path. So what we need to do
* here is re-lookup the top-level neigh in the path so
* we can reinject the packet there.
*/
n2 = NULL;
if (dst) {
n2 = dst_neigh_lookup_skb(dst, skb);
if (n2)
n1 = n2;
}
n1->output(n1, skb);
if (n2)
neigh_release(n2);
rcu_read_unlock();

write_lock_bh(&neigh->lock);
Expand Down

0 comments on commit 72bf35d

Please sign in to comment.