X-Git-Url: http://git.archive.openwrt.org/?a=blobdiff_plain;ds=inline;f=interface.c;h=0a53151c5a33959430c07ef3f1e5ef330e100283;hb=85218c601b0f5895f9025910643761930c02eb1a;hp=057616669cafaa040b85237ffc638dc03f2a51fa;hpb=fd4efb1bbfe5a502a802f43871cfae9944c8d75f;p=project%2Fnetifd.git diff --git a/interface.c b/interface.c index 0576166..0a53151 100644 --- 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; } @@ -189,6 +190,8 @@ alloc_interface(const char *name, struct uci_section *s) strncpy(iface->name, name, sizeof(iface->name) - 1); list_add(&iface->list, &interfaces); INIT_LIST_HEAD(&iface->errors); + INIT_LIST_HEAD(&iface->address); + INIT_LIST_HEAD(&iface->routes); proto_attach_interface(iface, s);