X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmain.c;h=652240cc6868bf13b4404be886beff2231263cd0;hb=78cd384ce0f48bb5edb84e4fe9a574eab4a4ad14;hp=9e9803a2c81fdce2e44f781cc98f354b557df08d;hpb=56371803b11c557e07ae968bef34b178b518139d;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index 9e9803a..652240c 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -737,13 +737,14 @@ void set_ifunit(iskey) int iskey; { + char ifkey[32]; + if (req_ifname[0] != '\0') slprintf(ifname, sizeof(ifname), "%s", req_ifname); else slprintf(ifname, sizeof(ifname), "%s%d", PPP_DRV_NAME, ifunit); info("Using interface %s", ifname); script_setenv("IFNAME", ifname, iskey); - char ifkey[32]; slprintf(ifkey, sizeof(ifkey), "%d", ifunit); script_setenv("UNIT", ifkey, iskey); if (iskey) {