X-Git-Url: http://git.ozlabs.org/?p=ppp.git;a=blobdiff_plain;f=pppd%2Fsys-aix4.c;h=ca9cebc94c446fcfd353ae91f0759d6456a550b1;hp=e96e520434b8c7512b7ba2caa04cf22c02b4d267;hb=bc45bd7903b4439e920bc2095b7543dc768f7ff8;hpb=800ac338fdfc693ce08ede826907d7137c2c6f55 diff --git a/pppd/sys-aix4.c b/pppd/sys-aix4.c index e96e520..ca9cebc 100644 --- a/pppd/sys-aix4.c +++ b/pppd/sys-aix4.c @@ -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. */