]> git.ozlabs.org Git - ppp.git/commitdiff
we don't have sa_len in sockaddr
authorPaul Mackerras <paulus@samba.org>
Fri, 28 Apr 1995 06:26:57 +0000 (06:26 +0000)
committerPaul Mackerras <paulus@samba.org>
Fri, 28 Apr 1995 06:26:57 +0000 (06:26 +0000)
pppd/sys-aix4.c
pppd/sys-linux.c
pppd/sys-str.c
pppd/sys-ultrix.c

index e96e520434b8c7512b7ba2caa04cf22c02b4d267..b6485ec34c94e298e7bf9284016ddf798dce4284 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-aix4.c,v 1.4 1995/04/27 00:33:49 paulus Exp $";
+static char rcsid[] = "$Id: sys-aix4.c,v 1.5 1995/04/28 06:25:40 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -1114,6 +1114,8 @@ get_ether_addr(ipaddr, hwaddr)
  * network as `addr'.  If we find any, we OR in their netmask to the
  * user-specified netmask.
  */
  * 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;
 u_int32_t
 GetMask(addr)
     u_int32_t addr;
@@ -1143,8 +1145,7 @@ GetMask(addr)
        return mask;
     }
     ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
        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.
         */
        /*
         * Check the interface's internet address.
         */
index 34830f06ba0a11e94433b814397e00dd553071b5..946a2f93033eb5e377208ba9e046bb8c0c36f3b7 100644 (file)
@@ -42,7 +42,7 @@
 #include <net/if.h>
 #include <net/ppp_defs.h>
 #include <net/if_arp.h>
 #include <net/if.h>
 #include <net/ppp_defs.h>
 #include <net/if_arp.h>
-#include <net/if_ppp.h>
+#include <linux/if_ppp.h>
 #include <net/if_route.h>
 #include <linux/if_ether.h>
 #include <netinet/in.h>
 #include <net/if_route.h>
 #include <linux/if_ether.h>
 #include <netinet/in.h>
@@ -1184,8 +1184,7 @@ GetMask(addr)
        return mask;
     }
     ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
        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.
         */
        /*
         * Check the interface's internet address.
         */
index 051f10dd306bd4ab688671ca0deee61eaa34dbd1..f5afba95d119d8da644d9952853a4e189371ccff 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
  */
 
 #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
 
 /*
 #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.
  */
  * 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;
 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);
        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.
         */
        /*
         * Check the interface's internet address.
         */
index d8653f141d2af8cf4a249f9ec5bde93465838b0e..879aedaa0f8763817adf2ca3aba36f7499355bd5 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-ultrix.c,v 1.9 1995/04/27 00:45:24 paulus Exp $";
+static char rcsid[] = "$Id: sys-ultrix.c,v 1.10 1995/04/28 06:26:57 paulus Exp $";
 #endif
 
 /*
 #endif
 
 /*
@@ -1012,7 +1012,7 @@ GetMask(addr)
     }
     ifend = (struct ifreq *) (ifc.ifc_buf + ifc.ifc_len);
     for (ifr = ifc.ifc_req; ifr < ifend; ifr = (struct ifreq *)
     }
     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)) {
+               ((char *)&ifr->ifr_addr + sizeof(struct sockaddr))) {
        /*
         * Check the interface's internet address.
         */
        /*
         * Check the interface's internet address.
         */