diff --git a/pppd/main.c b/pppd/main.c index ed1ae6810..2a10f0ee3 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -784,7 +784,13 @@ set_ifup(const char* name) const char** t; if (!up_protos) { + 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); + } if (!netif_set_state(1)) return 0; }