]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-aix4.c
Added -vjccid and vj-max-slots options, and reorganized in
[ppp.git] / pppd / sys-aix4.c
index e96e520434b8c7512b7ba2caa04cf22c02b4d267..ca9cebc94c446fcfd353ae91f0759d6456a550b1 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #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.6 1995/05/01 00:26:11 paulus Exp $";
 #endif
 
 /*
@@ -463,6 +463,15 @@ void
 restore_tty()
 {
     if (restore_term) {
+       if (!default_device) {
+           /*
+            * Turn off echoing, because otherwise we can get into
+            * a loop with the tty and the modem echoing to each other.
+            * We presume we are the sole user of this tty device, so
+            * when we close it, it will revert to its defaults anyway.
+            */
+           inittermios.c_lflag &= ~(ECHO | ECHONL);
+       }
        if (tcsetattr(fd, TCSAFLUSH, &inittermios) < 0)
            if (errno != ENXIO)
                syslog(LOG_WARNING, "tcsetattr: %m");
@@ -1114,6 +1123,8 @@ get_ether_addr(ipaddr, hwaddr)
  * 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;
@@ -1143,8 +1154,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.
         */