summaryrefslogtreecommitdiffhomepage
path: root/interface.c
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-12-13 17:13:43 +0100
committerFelix Fietkau <nbd@openwrt.org>2012-12-13 17:13:43 +0100
commitd46bc6515c3362538e298b8b038ae04adcb7db65 (patch)
tree0700e844bca52e9f6e79c28f03c18e9b66e7d4c4 /interface.c
parent875e9e4b93fd8ff1f15e01cfba6ac5359444880a (diff)
rewrite resolv.conf after any interface state change (not just up)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>
Diffstat (limited to 'interface.c')
-rw-r--r--interface.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/interface.c b/interface.c
index 2456227..43d1396 100644
--- a/interface.c
+++ b/interface.c
@@ -393,7 +393,6 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve
iface->state = IFS_UP;
iface->start_time = system_get_rtime();
interface_event(iface, IFEV_UP);
- interface_write_resolv_conf();
netifd_log_message(L_NOTICE, "Interface '%s' is now up\n", iface->name);
break;
case IFPEV_DOWN:
@@ -415,6 +414,8 @@ interface_proto_cb(struct interface_proto_state *state, enum interface_proto_eve
iface->state = IFS_SETUP;
break;
}
+
+ interface_write_resolv_conf();
}
void interface_set_proto_state(struct interface *iface, struct interface_proto_state *state)