Commit e9000a9b authored by Phil Blundell's avatar Phil Blundell

Avoid closing a socket we're about to use.

parent d828f5ce
......@@ -101,7 +101,7 @@ endif
# -------- end of user definitions --------
MAINTAINER = Philip.Blundell@pobox.com
RELEASE = 1.58
RELEASE = 1.59
.EXPORT_ALL_VARIABLES:
......
......@@ -32,7 +32,7 @@ Contents:
Notes
-----
This is net-tools 1.58.
This is net-tools 1.59.
You need kernel 2.0 or later to use these programs. These programs
should compile cleanly with both glibc (version 2.0 or 2.1) and libc5,
......
......@@ -3,7 +3,7 @@
* that either displays or sets the characteristics of
* one or more of the system's networking interfaces.
*
* Version: $Id: ifconfig.c,v 1.43 2000/10/26 03:19:06 ak Exp $
* Version: $Id: ifconfig.c,v 1.44 2001/02/12 21:06:47 pb Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
......@@ -312,13 +312,13 @@ int main(int argc, char **argv)
else
ap = get_aftype(DFLT_AF);
if(ap) {
if (ap) {
addr_family = ap->af;
if ((fd=sockets_open(addr_family)) < 0) {
perror("family socket");
exit(1);
} else {
if (skfd) close(skfd);
if (skfd > 0 && skfd != fd) close(skfd);
skfd = fd;
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment