Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 10065
b: refs/heads/master
c: 49636bb
h: refs/heads/master
i:
  10063: 73fe162
v: v3
  • Loading branch information
Herbert Xu committed Oct 23, 2005
1 parent cff1f4b commit 65640fc
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 31 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: 6fb9974f49f7a6032118c5b6caa6e08e7097913e
refs/heads/master: 49636bb12892786e4a7b207b37ca7b0c5ca1cae0
43 changes: 13 additions & 30 deletions trunk/net/core/neighbour.c
Original file line number Diff line number Diff line change
Expand Up @@ -175,39 +175,10 @@ static void pneigh_queue_purge(struct sk_buff_head *list)
}
}

void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
{
int i;

write_lock_bh(&tbl->lock);

for (i=0; i <= tbl->hash_mask; i++) {
struct neighbour *n, **np;

np = &tbl->hash_buckets[i];
while ((n = *np) != NULL) {
if (dev && n->dev != dev) {
np = &n->next;
continue;
}
*np = n->next;
write_lock_bh(&n->lock);
n->dead = 1;
neigh_del_timer(n);
write_unlock_bh(&n->lock);
neigh_release(n);
}
}

write_unlock_bh(&tbl->lock);
}

int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
static void neigh_flush_dev(struct neigh_table *tbl, struct net_device *dev)
{
int i;

write_lock_bh(&tbl->lock);

for (i = 0; i <= tbl->hash_mask; i++) {
struct neighbour *n, **np = &tbl->hash_buckets[i];

Expand Down Expand Up @@ -243,7 +214,19 @@ int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
neigh_release(n);
}
}
}

void neigh_changeaddr(struct neigh_table *tbl, struct net_device *dev)
{
write_lock_bh(&tbl->lock);
neigh_flush_dev(tbl, dev);
write_unlock_bh(&tbl->lock);
}

int neigh_ifdown(struct neigh_table *tbl, struct net_device *dev)
{
write_lock_bh(&tbl->lock);
neigh_flush_dev(tbl, dev);
pneigh_ifdown(tbl, dev);
write_unlock_bh(&tbl->lock);

Expand Down

0 comments on commit 65640fc

Please sign in to comment.