X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=pppd%2Fmain.c;h=9e9803a2c81fdce2e44f781cc98f354b557df08d;hb=56371803b11c557e07ae968bef34b178b518139d;hp=1b3f1e54bdd3250cb41fb986b89b3aaff355128e;hpb=b6b4d28e0c38320ca6753af40845df991118cd11;p=ppp.git diff --git a/pppd/main.c b/pppd/main.c index 1b3f1e5..9e9803a 100644 --- a/pppd/main.c +++ b/pppd/main.c @@ -743,6 +743,9 @@ set_ifunit(iskey) 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) { create_pidfile(getpid()); /* write pid to file */ create_linkpidfile(getpid());