X-Git-Url: https://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-str.c;h=f5afba95d119d8da644d9952853a4e189371ccff;hp=051f10dd306bd4ab688671ca0deee61eaa34dbd1;hb=ed3c62f8932c151c211d064f95daed3f1f208f80;hpb=7dabc25770ff656c974723282a19f4bdec8deea4 diff --git a/pppd/sys-str.c b/pppd/sys-str.c index 051f10d..f5afba9 100644 --- a/pppd/sys-str.c +++ b/pppd/sys-str.c @@ -19,7 +19,7 @@ */ #ifndef lint -static char rcsid[] = "$Id: sys-str.c,v 1.18 1995/04/27 00:35:43 paulus Exp $"; +static char rcsid[] = "$Id: sys-str.c,v 1.19 1995/04/28 06:26:46 paulus Exp $"; #endif /* @@ -1107,6 +1107,8 @@ logwtmp(line, name, host) * network as `addr'. If we find any, we OR in their netmask to the * user-specified netmask. */ +#define MAX_IFS 32 + u_int32_t GetMask(addr) u_int32_t addr; @@ -1136,8 +1138,7 @@ GetMask(addr) return mask; } ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len); - for (ifr = ifc.ifc_req; ifr < ifend; ifr = (struct ifreq *) - ((char *)&ifr->ifr_addr + ifr->ifr_addr.sa_len)) { + for (ifr = ifc.ifc_req; ifr < ifend; ++ifr) { /* * Check the interface's internet address. */