projects
/
project
/
netifd.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
17aab88
)
clear all remaining addresses on interface down
author
Felix Fietkau
<nbd@openwrt.org>
Mon, 2 May 2011 20:20:30 +0000
(22:20 +0200)
committer
Felix Fietkau
<nbd@openwrt.org>
Mon, 2 May 2011 20:20:30 +0000
(22:20 +0200)
interface-ip.c
patch
|
blob
|
history
interface.c
patch
|
blob
|
history
diff --git
a/interface-ip.c
b/interface-ip.c
index 20df281af886875405c3ee335653177e32c8652e..797be584c5a0de3dbad1ed731762ea97b26d0381 100644
(file)
--- a/
interface-ip.c
+++ b/
interface-ip.c
@@
-40,7
+40,7
@@
void interface_del_ctx_addr(struct interface *iface, void *ctx)
struct interface_addr *addr, *tmp;
list_for_each_entry_safe(addr, tmp, &iface->address, list) {
- if (addr->ctx != ctx)
+ if (
ctx &&
addr->ctx != ctx)
continue;
interface_del_address(iface, addr);
diff --git
a/interface.c
b/interface.c
index 88cf6824fcc04c12da32b346a39e0b9fd5259e11..0a53151c5a33959430c07ef3f1e5ef330e100283 100644
(file)
--- a/
interface.c
+++ b/
interface.c
@@
-64,6
+64,7
@@
interface_event(struct interface *iface, enum interface_event ev)
static void
mark_interface_down(struct interface *iface)
{
+ interface_del_ctx_addr(iface, NULL);
release_device(iface->main_dev.dev);
iface->state = IFS_DOWN;
}