aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Makefile2
-rw-r--r--ifconfig.c14
-rw-r--r--lib/ash.c5
-rw-r--r--lib/econet.c4
-rw-r--r--lib/loopback.c4
-rw-r--r--lib/net-support.h1
-rw-r--r--lib/sockets.c2
7 files changed, 15 insertions, 17 deletions
diff --git a/Makefile b/Makefile
index 5cd801d..ab19616 100644
--- a/Makefile
+++ b/Makefile
@@ -96,7 +96,7 @@ endif
# -------- end of user definitions --------
MAINTAINER = Philip.Blundell@pobox.com
-RELEASE = 1.51
+RELEASE = 1.52
.EXPORT_ALL_VARIABLES:
diff --git a/ifconfig.c b/ifconfig.c
index e351869..d81228e 100644
--- a/ifconfig.c
+++ b/ifconfig.c
@@ -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.29 1999/03/24 09:49:45 philip Exp $
+ * Version: $Id: ifconfig.c,v 1.30 1999/04/04 21:37:01 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* and others. Copyright 1993 MicroWalt Corporation
@@ -148,9 +148,6 @@ void ife_print(struct interface *ptr)
hf = ptr->type;
- if (strncmp(ptr->name, "lo", 2) == 0)
- hf = 255;
-
if (hf == ARPHRD_CSLIP || hf == ARPHRD_CSLIP6)
can_compress = 1;
@@ -159,11 +156,10 @@ void ife_print(struct interface *ptr)
hw = get_hwntype(-1);
printf(_("%-9.9s Link encap:%s "), ptr->name, hw->title);
- /* Don't print the hardware address for ATM or Ash if it's null. */
- /* FIXME. Make this an option in struct hwtype. */
- if (hw->sprint != NULL && ((strncmp(ptr->name, "atm", 3) &&
- strncmp(ptr->name, "ash", 3)) ||
- (! hw_null_address(hw, ptr->hwaddr))))
+ /* For some hardware types (eg Ash, ATM) we don't print the
+ hardware address if it's null. */
+ if (hw->sprint != NULL && (! (hw_null_address(hw, ptr->hwaddr) &&
+ hw->suppress_null_addr)))
printf(_("HWaddr %s "), hw->print(ptr->hwaddr));
#ifdef IFF_PORTSEL
if (ptr->flags & IFF_PORTSEL) {
diff --git a/lib/ash.c b/lib/ash.c
index 82a6d74..8f0a798 100644
--- a/lib/ash.c
+++ b/lib/ash.c
@@ -1,7 +1,7 @@
/*
* lib/ash.c This file contains an implementation of the Ash
* support functions for the NET-2 base distribution.
- * $Id: ash.c,v 1.9 1999/01/05 20:53:20 philip Exp $
+ * $Id: ash.c,v 1.10 1999/04/04 21:37:02 philip Exp $
*/
#include "config.h"
@@ -101,7 +101,8 @@ static int in_ash(char *bufp, struct sockaddr *sap)
struct hwtype ash_hwtype =
{
"ash", NULL, ARPHRD_ASH, ASH_ALEN,
- pr_ash, pr_sash, in_ash, NULL
+ pr_ash, pr_sash, in_ash, NULL,
+ 1
};
#endif
diff --git a/lib/econet.c b/lib/econet.c
index 4c2c322..36b47e8 100644
--- a/lib/econet.c
+++ b/lib/econet.c
@@ -3,7 +3,7 @@
* support functions for the net-tools.
* (NET-3 base distribution).
*
- * Version: $Id: econet.c,v 1.6 1999/01/05 20:53:23 philip Exp $
+ * Version: $Id: econet.c,v 1.7 1999/04/04 21:37:03 philip Exp $
*
* Author: Philip Blundell <philb@gnu.org>
*
@@ -82,7 +82,7 @@ struct aftype ec_aftype =
ec_print, ec_sprint, ec_input, NULL,
NULL, NULL, NULL,
-1,
- NULL
+ "/proc/sys/net/econet"
};
#endif /* HAVE_AFECONET */
diff --git a/lib/loopback.c b/lib/loopback.c
index ccf6a19..fc39e00 100644
--- a/lib/loopback.c
+++ b/lib/loopback.c
@@ -1,7 +1,7 @@
/*
* lib/loopback.c This file contains the general hardware types.
*
- * Version: $Id: loopback.c,v 1.5 1998/11/19 13:02:02 philip Exp $
+ * Version: $Id: loopback.c,v 1.6 1999/04/04 21:37:04 philip Exp $
*
* Author: Fred N. van Kempen, <waltje@uwalt.nl.mugnet.org>
* Copyright 1993 MicroWalt Corporation
@@ -66,6 +66,6 @@ struct hwtype unspec_hwtype =
struct hwtype loop_hwtype =
{
- "loop", NULL, /*"Local Loopback", */ 255 /*ARPHRD_LOOPBACK */ , 0,
+ "loop", NULL, /*"Local Loopback", */ ARPHRD_LOOPBACK, 0,
NULL, NULL, NULL, NULL
};
diff --git a/lib/net-support.h b/lib/net-support.h
index a675100..6109de0 100644
--- a/lib/net-support.h
+++ b/lib/net-support.h
@@ -64,6 +64,7 @@ struct hwtype {
char *(*sprint) (struct sockaddr *);
int (*input) (char *, struct sockaddr *);
int (*activate) (int fd);
+ int suppress_null_addr;
};
diff --git a/lib/sockets.c b/lib/sockets.c
index f2475f2..e4ae5e5 100644
--- a/lib/sockets.c
+++ b/lib/sockets.c
@@ -53,7 +53,7 @@ int sockets_open(int family)
#endif
af->fd = socket(af->af, type, 0);
if (af->fd >= 0)
- sfd = af->fd;
+ sfd = af->fd;
}
if (sfd < 0)
fprintf(stderr, _("No usable address families found.\n"));