summaryrefslogtreecommitdiffstats
path: root/usr.sbin/ppp/route.c
diff options
context:
space:
mode:
authorbrian <brian@FreeBSD.org>1998-06-27 23:48:54 +0000
committerbrian <brian@FreeBSD.org>1998-06-27 23:48:54 +0000
commitecefb9d1a210a6c86638b396ea5ece55c433bc66 (patch)
tree0a77c0e67b7da6215327359880d61c222fd24aa7 /usr.sbin/ppp/route.c
parent40b850dd415ad2adcddb88549067b23762bce91a (diff)
downloadFreeBSD-src-ecefb9d1a210a6c86638b396ea5ece55c433bc66.zip
FreeBSD-src-ecefb9d1a210a6c86638b396ea5ece55c433bc66.tar.gz
o Fix remaining sizeof problems for 64 bit machines.
o Allow ``set ....'' when we have multiple links but aren't in multilink mode. o Do a TLS when we receive a ``Open'' event in ``Closed'' state, despite the rfc state transition table. This is clearly an error in the RFC as TLS cannot have yet been called (without TLF) in the ``Closed'' state. I've posted a message to comp.protocols.ppp for confirmation.
Diffstat (limited to 'usr.sbin/ppp/route.c')
-rw-r--r--usr.sbin/ppp/route.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/usr.sbin/ppp/route.c b/usr.sbin/ppp/route.c
index 644e557..5dc9061 100644
--- a/usr.sbin/ppp/route.c
+++ b/usr.sbin/ppp/route.c
@@ -17,7 +17,7 @@
* IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
* WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
*
- * $Id: route.c,v 1.49 1998/06/16 19:40:40 brian Exp $
+ * $Id: route.c,v 1.50 1998/06/27 12:03:49 brian Exp $
*
*/
@@ -80,8 +80,8 @@ p_sockaddr(struct prompt *prompt, struct sockaddr *phost,
else if (!mask)
strcpy(buf, inet_ntoa(ihost->sin_addr));
else {
- u_int msk = ntohl(mask->sin_addr.s_addr);
- u_int tst;
+ u_int32_t msk = ntohl(mask->sin_addr.s_addr);
+ u_int32_t tst;
int bits;
int len;
struct sockaddr_in net;
@@ -90,20 +90,20 @@ p_sockaddr(struct prompt *prompt, struct sockaddr *phost,
if (msk & tst)
break;
- for (tst <<=1; tst; tst <<= 1)
+ for (tst <<= 1; tst; tst <<= 1)
if (!(msk & tst))
break;
net.sin_addr.s_addr = ihost->sin_addr.s_addr & mask->sin_addr.s_addr;
strcpy(buf, inet_ntoa(net.sin_addr));
- for (len = strlen(buf); len > 3; buf[len-=2] = '\0')
- if (strcmp(buf+len-2, ".0"))
+ for (len = strlen(buf); len > 3; buf[len -= 2] = '\0')
+ if (strcmp(buf + len - 2, ".0"))
break;
if (tst) /* non-contiguous :-( */
- sprintf(buf+strlen(buf),"&0x%08x", msk);
+ sprintf(buf + strlen(buf),"&0x%08lx", (u_long)msk);
else
- sprintf(buf+strlen(buf), "/%d", bits);
+ sprintf(buf + strlen(buf), "/%d", bits);
}
break;
OpenPOWER on IntegriCloud