Subject: kern/922: ARCnet should complain if link address == broadcast address
To: None <gnats-admin@NetBSD.ORG>
From: Ignatios Souvatzis <is@beverly.rhein.de>
List: netbsd-bugs
Date: 03/29/1995 13:20:03
>Number: 922
>Category: kern
>Synopsis: ARCnet should complain if link address == broadcast address
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: kern-bug-people (Kernel Bug People)
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Wed Mar 29 13:20:02 1995
>Originator: Ignatios Souvatzis
>Organization:
" "
>Release: 1.0A
>Environment:
System: NetBSD beverly 1.0A NetBSD 1.0A (BEVERLY) #41: Mon Mar 27 10:35:09 MET DST 1995 is@beverly:/usr/src/sys/arch/amiga/compile/BEVERLY amiga
>Description:
if_arcsubr.c accepts whatever the hardware driver reports as the link
address. It should complain if all zeros (the broadcast address) is
chosen.
>How-To-Repeat:
Set DIP switches for the link address to zero, then ifconfig down and
up again. The address will be accepted.
>Fix:
Apply the following diffs to /sys/net/if_arcsubr.c (this will work for
all drivers.
*** 1.7 1995/03/08 08:18:40
--- /sys/net/if_arcsubr.c 1995/03/08 08:22:41
***************
*** 44,49 ****
--- 44,50 ----
#include <sys/malloc.h>
#include <sys/mbuf.h>
#include <sys/socket.h>
+ #include <sys/syslog.h>
#include <sys/errno.h>
#include <machine/cpu.h>
***************
*** 268,273 ****
--- 269,279 ----
ifp->if_addrlen = 1;
ifp->if_hdrlen = ARC_HDRLEN;
ifp->if_mtu = ARCMTU;
+ if (((struct arccom *)ifp)->ac_anaddr == 0) {
+ log(LOG_ERR,"%s%d: link address 0 reserved for broadcasts.\n\
+ Please change it and ifconfig %s%d down up\n",
+ ifp->if_name,ifp->if_unit,ifp->if_name,ifp->if_unit);
+ }
for (ifa = ifp->if_addrlist; ifa; ifa = ifa->ifa_next)
if ((sdl = (struct sockaddr_dl *)ifa->ifa_addr) &&
sdl->sdl_family == AF_LINK) {
>Audit-Trail:
>Unformatted:
Ignatios Souvatzis