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 | |
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')
-rw-r--r-- | usr.sbin/ppp/command.c | 8 | ||||
-rw-r--r-- | usr.sbin/ppp/ipcp.c | 23 | ||||
-rw-r--r-- | usr.sbin/ppp/ipcp.h | 3 |
3 files changed, 28 insertions, 6 deletions
diff --git a/usr.sbin/ppp/command.c b/usr.sbin/ppp/command.c index d3b106b..ff80847 100644 --- a/usr.sbin/ppp/command.c +++ b/usr.sbin/ppp/command.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: command.c,v 1.5 1995/05/30 03:50:30 rgrimes Exp $ + * $Id: command.c,v 1.6 1995/06/16 07:07:56 phk Exp $ * */ #include <ctype.h> @@ -629,6 +629,12 @@ char **argv; &DefHisAddress.ipaddr, &DefHisAddress.mask, &DefHisAddress.width); if (--argc > 0) { ifnetmask = GetIpAddr(*argv); + if (--argc > 0) { + ParseAddr(argc, argv++, + &DefTriggerAddress.ipaddr, + &DefTriggerAddress.mask, + &DefTriggerAddress.width); + } } } } 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 diff --git a/usr.sbin/ppp/ipcp.h b/usr.sbin/ppp/ipcp.h index 964f27f..220381f 100644 --- a/usr.sbin/ppp/ipcp.h +++ b/usr.sbin/ppp/ipcp.h @@ -15,7 +15,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id:$ + * $Id: ipcp.h,v 1.2 1995/02/26 12:17:34 amurai Exp $ * * TODO: */ @@ -56,6 +56,7 @@ struct in_range { extern struct ipcpstate IpcpInfo; extern struct in_range DefMyAddress; extern struct in_range DefHisAddress; +extern struct in_range DefTriggerAddress; extern void IpcpInit __P((void)); extern void IpcpDefAddress __P((void)); |