X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-ultrix.c;h=46369e6cc1fcf9102e0d64df8aba1fc0816b9350;hp=d8653f141d2af8cf4a249f9ec5bde93465838b0e;hb=a065bb9e75a41b9fddc43fc8fb97a395db7e21c5;hpb=416f33f79891785c39465e6b3f1010ee92fb78aa diff --git a/pppd/sys-ultrix.c b/pppd/sys-ultrix.c index d8653f1..46369e6 100644 --- a/pppd/sys-ultrix.c +++ b/pppd/sys-ultrix.c @@ -19,7 +19,7 @@ */ #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.11 1995/05/01 00:25:38 paulus Exp $"; #endif /* @@ -401,6 +401,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"); @@ -1012,7 +1021,7 @@ GetMask(addr) } 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. */