summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--discover/network.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/discover/network.c b/discover/network.c
index ca4cc44..2b7e94c 100644
--- a/discover/network.c
+++ b/discover/network.c
@@ -181,6 +181,15 @@ static int interface_change(struct interface *interface, bool up)
process_release(interface->udhcpc_process);
}
+ if (!up) {
+ rc = process_run_simple(interface, pb_system_apps.ip,
+ "address", "flush", "dev", interface->name,
+ NULL);
+ if (rc)
+ pb_log("failed to flush addresses from interface %s\n",
+ interface->name);
+ }
+
rc = process_run_simple(interface, pb_system_apps.ip,
"link", "set", interface->name, statestr, NULL);
if (rc) {
OpenPOWER on IntegriCloud