diff options
-rw-r--r-- | usr.sbin/ppp/command.c | 5 | ||||
-rw-r--r-- | usr.sbin/ppp/os.c | 2 |
2 files changed, 6 insertions, 1 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index 05770dc66155..c72d72143d11 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -55,6 +55,8 @@ extern void TtyOldMode(), TtyCommandMode(); extern struct pppvars pppVars; extern struct cmdtab const SetCommands[]; +extern char *IfDevName; + struct in_addr ifnetmask; static int ShowCommand(), TerminalCommand(), QuitCommand(); @@ -214,6 +216,9 @@ char **argv; if (strcmp(argv[i], "HISADDR") == 0) { argv[i] = strdup(inet_ntoa(IpcpInfo.his_ipaddr)); } + if (strcmp(argv[i], "INTERFACE") == 0) { + argv[i] = strdup(IfDevName); + } if (strcmp(argv[i], "MYADDR") == 0) { argv[i] = strdup(inet_ntoa(IpcpInfo.want_ipaddr)); } diff --git a/usr.sbin/ppp/os.c b/usr.sbin/ppp/os.c index 950672e0569d..d3defc882c14 100644 --- a/usr.sbin/ppp/os.c +++ b/usr.sbin/ppp/os.c @@ -272,7 +272,7 @@ int *ptun; { int s; char ifname[IFNAMSIZ]; - char devname[14]; /* sufficient room for "/dev/tun65535" */ + static char devname[14]; /* sufficient room for "/dev/tun65535" */ unsigned unit, enoentcount=0; for( unit=0; unit <= MAX_TUN ; unit++ ) { |