Subject: bin/4835: rarpd does not set the kernel arp tables correctly
To: None <>
From: None <>
List: netbsd-bugs
Date: 01/17/1998 17:28:34
>Number:         4835
>Category:       bin
>Synopsis:       rarpd does not set the kernel arp tables correctly
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    bin-bug-people (Utility Bug People)
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sat Jan 17 00:35:00 1998
>Originator:     Izumi Tsutsui
>Release:        1.3RELEASE
System: NetBSD mirage 1.3 NetBSD 1.3 (MIRAGE) #63: Fri Jan 9 17:39:14 JST 1998 tsutsui@mirage:/usr/src/sys/arch/i386/compile/MIRAGE i386


On receiving a RARP request, rarpd also set the kernel arp tables,
but it does not set sdl_alen (link level addres length) so
the arp tables of booting hosts are incomplete.


Set up hosts(5) and ethers(5) database and send RARP request to
the host from diskless client (I tried boot from sparc PROM monitor). 
After replying the request, the arp -a still shows client's
MAC address `incomplete'.


Add setting sdl_alen value in mkarp().

*** usr.sbin/rarpd/mkarp.c.orig Tue Nov 25 22:54:08 1997
--- usr.sbin/rarpd/mkarp.c      Sat Jan 17 16:18:26 1998
*************** mkarp(haddr, ipaddr)
*** 122,127 ****
--- 122,128 ----
  	while (p < endp) {
  		*p++ = *haddr++;
+ 	sdl_m.sdl_alen = 6;
  	rtm->rtm_flags = 0;