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
20df281
..
797be58
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) {
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);
continue;
interface_del_address(iface, addr);
diff --git
a/interface.c
b/interface.c
index
88cf682
..
0a53151
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)
{
static void
mark_interface_down(struct interface *iface)
{
+ interface_del_ctx_addr(iface, NULL);
release_device(iface->main_dev.dev);
iface->state = IFS_DOWN;
}
release_device(iface->main_dev.dev);
iface->state = IFS_DOWN;
}