X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fipcp.c;h=6250c7e6921bd9813b1da35d6a51bbb12c991343;hp=78366f4cb3d3b146106f9c96cf0f1578a581d07f;hb=671b8cc6878153fb277dc6aeee5a1c404cd0b87e;hpb=425bc49f579e41f1f137c4291498b876529795bb diff --git a/pppd/ipcp.c b/pppd/ipcp.c index 78366f4..6250c7e 100644 --- a/pppd/ipcp.c +++ b/pppd/ipcp.c @@ -18,7 +18,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: ipcp.c,v 1.32 1997/07/14 03:52:56 paulus Exp $"; +static char rcsid[] = "$Id: ipcp.c,v 1.34 1998/04/28 23:38:09 paulus Exp $"; #endif /* @@ -1157,6 +1157,8 @@ ipcp_up(f) ipcp_close(f->unit, "Could not determine local IP address"); return; } + script_setenv("IPLOCAL", ip_ntoa(go->ouraddr)); + script_setenv("IPREMOTE", ip_ntoa(ho->hisaddr)); /* * Check that the peer is allowed to use the IP address it wants. @@ -1409,9 +1411,9 @@ ipcp_printpkt(p, plen, printer, arg) if (olen == CILEN_ADDRS) { p += 2; GETLONG(cilong, p); - printer(arg, "addrs %s", ip_ntoa(htonl(cilong))); + printer(arg, "addrs %I", htonl(cilong)); GETLONG(cilong, p); - printer(arg, " %s", ip_ntoa(htonl(cilong))); + printer(arg, " %I", htonl(cilong)); } break; case CI_COMPRESSTYPE: @@ -1435,20 +1437,20 @@ ipcp_printpkt(p, plen, printer, arg) if (olen == CILEN_ADDR) { p += 2; GETLONG(cilong, p); - printer(arg, "addr %s", ip_ntoa(htonl(cilong))); + printer(arg, "addr %I", htonl(cilong)); } break; case CI_MS_DNS1: case CI_MS_DNS2: p += 2; GETLONG(cilong, p); - printer(arg, "dns-addr %s", ip_ntoa(htonl(cilong))); + printer(arg, "ms-dns %I", htonl(cilong)); break; case CI_MS_WINS1: case CI_MS_WINS2: p += 2; GETLONG(cilong, p); - printer(arg, "wins-addr %s", ip_ntoa(htonl(cilong))); + printer(arg, "ms-wins %I", htonl(cilong)); break; } while (p < optend) {