]> git.ozlabs.org Git - ppp.git/blobdiff - pppd/sys-osf.c
fix stats stuff
[ppp.git] / pppd / sys-osf.c
index 66fc07d0856e2da1d44be01968535228fab3783a..5b1d2ab8342aced220f14866e82dfef713f80d53 100644 (file)
@@ -19,7 +19,7 @@
  */
 
 #ifndef lint
-static char rcsid[] = "$Id: sys-osf.c,v 1.2 1995/04/27 00:44:46 paulus Exp $";
+static char rcsid[] = "$Id: sys-osf.c,v 1.4 1995/05/01 00:26:01 paulus Exp $";
 #endif
 
 /*
@@ -587,6 +587,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");
@@ -1193,8 +1202,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.
         */