diff options
author | amurai <amurai@FreeBSD.org> | 1995-07-08 08:28:10 +0000 |
---|---|---|
committer | amurai <amurai@FreeBSD.org> | 1995-07-08 08:28:10 +0000 |
commit | 12091de41566fdff7513612a2345a4b4c08f3448 (patch) | |
tree | 33211f8cb8437cc275d2e27a83f6a9ec99c73131 /usr.sbin/ppp/ipcp.c | |
parent | ced7ace3735ea07f1c2bf344cdf6d06171a67441 (diff) | |
download | FreeBSD-src-12091de41566fdff7513612a2345a4b4c08f3448.zip FreeBSD-src-12091de41566fdff7513612a2345a4b4c08f3448.tar.gz |
Some implementation of PPP are required that starting a negotiaion by
sending *special* value as my address, even though the standard of PPP
is defined full negotiation based. (e.g. "0.0.0.0" or Not "0.0.0.0")
Diffstat (limited to 'usr.sbin/ppp/ipcp.c')
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index 67e0ad5..ad70fd5 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipcp.c,v 1.4 1995/05/30 03:50:38 rgrimes Exp $ + * $Id: ipcp.c,v 1.5 1995/07/04 02:57:11 davidg Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -41,7 +41,7 @@ extern void Prompt(); extern struct in_addr ifnetmask; struct ipcpstate IpcpInfo; -struct in_range DefMyAddress, DefHisAddress; +struct in_range DefMyAddress, DefHisAddress, DefTriggerAddress; static void IpcpSendConfigReq __P((struct fsm *)); static void IpcpSendTerminateAck __P((struct fsm *)); @@ -125,10 +125,13 @@ ReportIpcpStatus() printf(" my side: %s, %x\n", inet_ntoa(icp->want_ipaddr), icp->want_compproto); printf("connected: %d secs, idle: %d secs\n\n", ipConnectSecs, ipIdleSecs); - printf("Defaults: My Address: %s/%d ", + printf("Defaults:\n"); + printf(" My Address: %s/%d\n", inet_ntoa(DefMyAddress.ipaddr), DefMyAddress.width); - printf("His Address: %s/%d\n", + printf(" His Address: %s/%d\n", inet_ntoa(DefHisAddress.ipaddr), DefHisAddress.width); + printf(" Negotiation: %s/%d\n", + inet_ntoa(DefTriggerAddress.ipaddr), DefTriggerAddress.width); } void @@ -139,6 +142,7 @@ IpcpDefAddress() bzero(&DefMyAddress, sizeof(DefMyAddress)); bzero(&DefHisAddress, sizeof(DefHisAddress)); + bzero(&DefTriggerAddress, sizeof(DefTriggerAddress)); if (gethostname(name, sizeof(name)) == 0) { hp = gethostbyname(name); if (hp && hp->h_addrtype == AF_INET) { @@ -160,6 +164,17 @@ IpcpInit() icp->want_ipaddr.s_addr = DefMyAddress.ipaddr.s_addr; icp->his_ipaddr.s_addr = DefHisAddress.ipaddr.s_addr; } + + /* + * Some implementation of PPP are: + * Starting a negotiaion by require sending *special* value as my address, + * even though standard of PPP is defined full negotiation based. + * (e.g. "0.0.0.0" or Not "0.0.0.0") + */ + if ( icp->want_ipaddr.s_addr == 0 ) { + icp->want_ipaddr.s_addr = DefTriggerAddress.ipaddr.s_addr; + } + if (Enabled(ConfVjcomp)) icp->want_compproto = (PROTO_VJCOMP << 16) | ((MAX_STATES - 1) << 8); else |