diff --git a/usr.sbin/ppp/bundle.c b/usr.sbin/ppp/bundle.c index 02cc30e4de5f..8ddfadda9a13 100644 --- a/usr.sbin/ppp/bundle.c +++ b/usr.sbin/ppp/bundle.c @@ -23,7 +23,7 @@ * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * - * $Id: bundle.c,v 1.1.2.85 1998/05/16 23:47:20 brian Exp $ + * $Id: bundle.c,v 1.1.2.86 1998/05/17 10:16:14 brian Exp $ */ #include @@ -163,6 +163,7 @@ bundle_CleanInterface(const struct bundle *bundle) "bundle_CleanInterface: Can't get dst for %s on %s !\n", inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr), bundle->ifp.Name); + close(s); return 0; } ifra.ifra_broadaddr = ifrq.ifr_dstaddr; @@ -172,9 +173,11 @@ bundle_CleanInterface(const struct bundle *bundle) "bundle_CleanInterface: Can't delete %s address on %s !\n", inet_ntoa(((struct sockaddr_in *)&ifra.ifra_addr)->sin_addr), bundle->ifp.Name); + close(s); return 0; } } + close(s); return 1; } diff --git a/usr.sbin/ppp/ipcp.c b/usr.sbin/ppp/ipcp.c index dd3c1680b43b..e645816cdd01 100644 --- a/usr.sbin/ppp/ipcp.c +++ b/usr.sbin/ppp/ipcp.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: ipcp.c,v 1.50.2.51 1998/05/06 23:50:14 brian Exp $ + * $Id: ipcp.c,v 1.50.2.52 1998/05/15 23:58:23 brian Exp $ * * TODO: * o More RFC1772 backwoard compatibility @@ -651,11 +651,9 @@ ipcp_CleanInterface(struct ipcp *ipcp) me->sin_len = peer->sin_len = sizeof(struct sockaddr_in); me->sin_addr = ipcp->my_ifip; peer->sin_addr = ipcp->peer_ifip; - if (ID0ioctl(s, SIOCDIFADDR, &ifra) < 0) { + if (ID0ioctl(s, SIOCDIFADDR, &ifra) < 0) log_Printf(LogERROR, "ipcp_CleanInterface: ioctl(SIOCDIFADDR): %s\n", strerror(errno)); - close(s); - } ipcp->my_ifip.s_addr = ipcp->peer_ifip.s_addr = INADDR_ANY; } diff --git a/usr.sbin/ppp/modem.c b/usr.sbin/ppp/modem.c index bccc3cbf6b39..aa25e00dca02 100644 --- a/usr.sbin/ppp/modem.c +++ b/usr.sbin/ppp/modem.c @@ -17,7 +17,7 @@ * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED * WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. * - * $Id: modem.c,v 1.77.2.69 1998/05/12 17:34:29 brian Exp $ + * $Id: modem.c,v 1.77.2.70 1998/05/13 19:06:25 brian Exp $ * * TODO: */ @@ -401,6 +401,7 @@ OpenConnection(const char *name, char *host, char *port) } if (connect(sock, (struct sockaddr *)&dest, sizeof dest) < 0) { log_Printf(LogWARN, "%s: connect: %s\n", name, strerror(errno)); + close(sock); return (-1); } return (sock);