X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=discover%2Fnetwork.c;h=1801710773b975106e43d6592de4a85d8ad55322;hp=ca4cc44acf1ba3d1334452b547326041c33f8b13;hb=b90b84b36d01f6663a79d9467a37cd9d6f6a68e7;hpb=310de3ab00b77b09a897b93ed0272b82ebc4f73b diff --git a/discover/network.c b/discover/network.c index ca4cc44..1801710 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) { @@ -219,7 +228,7 @@ static void configure_interface_dhcp(struct interface *interface) const char *argv[] = { pb_system_apps.udhcpc, "-R", - "-n", + "-f", "-O", "pxeconffile", "-O", "pxepathprefix", "-p", pidfile,