]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-linux.c
we don't have sa_len in sockaddr
[ppp.git] / pppd / sys-linux.c
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_ppp.h>
+#include <linux/if_ppp.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);
-    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.
         */