+ switch (p) {
+ case PHASE_NETWORK:
+ if (phase <= PHASE_NETWORK) {
+ char iftmpname[IFNAMSIZ];
+ int ifindex = if_nametoindex(ifname);
+ run_net_script(PPP_PATH_NET_PREUP, 1);
+ if (if_indextoname(ifindex, iftmpname) && strcmp(iftmpname, ifname)) {
+ info("Detected interface name change from %s to %s.", ifname, iftmpname);
+ strcpy(ifname, iftmpname);
+ }
+ }
+ break;
+ case PHASE_DISCONNECT:
+ run_net_script(PPP_PATH_NET_DOWN, 0);
+ break;
+ }
+