I was attempting to setup a diskless workstation using linux 2.0.10
(Red Hat 3.0.3 distribution + updated RPMS) and bootp 2.4.1 (possibly
with RedHat patches? From NetKit-A-0.08), but had some problems.

The client did not know its IP address on bootup, so the server, in
order to send a message back to the client, first needed to setup an
entry in its arp table.  This was failing.

The reason it was failing was because the hardware address type was not
being passed along to the kernel.  I have included my patches for fixing
this.

Please send all responses to bgarcia@fore.com




diff -c2 bootp-2.4.1.orig/bootpd.c bootp-2.4.1/bootpd.c
*** bootp-2.4.1.orig/bootpd.c	Tue Aug 30 12:47:12 1994
--- bootp-2.4.1/bootpd.c	Sat Aug 24 10:06:04 1996
***************
*** 1038,1042 ****
  			report(LOG_INFO, "setarp %s - %s",
  				   inet_ntoa(dst), haddrtoa(ha, len));
! 		setarp(s, &dst, ha, len);
  	}
  
--- 1038,1042 ----
  			report(LOG_INFO, "setarp %s - %s",
  				   inet_ntoa(dst), haddrtoa(ha, len));
! 		setarp(s, &dst, ha, len, bp->bp_htype);
  	}
  
diff -c2 bootp-2.4.1.orig/bootpgw.c bootp-2.4.1/bootpgw.c
*** bootp-2.4.1.orig/bootpgw.c	Tue Aug 30 12:45:46 1994
--- bootp-2.4.1/bootpgw.c	Sat Aug 24 10:25:41 1996
***************
*** 652,656 ****
  		report(LOG_INFO, "setarp %s - %s",
  			   inet_ntoa(bp->bp_yiaddr), haddrtoa(ha, len));
! 	setarp(s, &bp->bp_yiaddr, ha, len);
  
  	/* Send reply with same size packet as request used. */
--- 652,656 ----
  		report(LOG_INFO, "setarp %s - %s",
  			   inet_ntoa(bp->bp_yiaddr), haddrtoa(ha, len));
! 	setarp(s, &bp->bp_yiaddr, ha, len, bp->bp_htype);
  
  	/* Send reply with same size packet as request used. */
diff -c2 bootp-2.4.1.orig/hwaddr.c bootp-2.4.1/hwaddr.c
*** bootp-2.4.1.orig/hwaddr.c	Wed Oct 12 17:03:00 1994
--- bootp-2.4.1/hwaddr.c	Sat Aug 24 10:29:00 1996
***************
*** 66,74 ****
   */
  void
! setarp(s, ia, ha, len)
  	int s;						/* socket fd */
  	struct in_addr *ia;
  	u_char *ha;
  	int len;
  {
  #ifdef	SIOCSARP
--- 66,75 ----
   */
  void
! setarp(s, ia, ha, len, htype)
  	int s;						/* socket fd */
  	struct in_addr *ia;
  	u_char *ha;
  	int len;
+ 	byte htype;
  {
  #ifdef	SIOCSARP
***************
*** 90,93 ****
--- 91,95 ----
  	/* Set up the hardware address. */
  	bcopy(ha, arpreq.arp_ha.sa_data, len);
+ 	arpreq.arp_ha.sa_family = (u_short)htype;
  
  #ifdef	SVR4
diff -c2 bootp-2.4.1.orig/hwaddr.h bootp-2.4.1/hwaddr.h
*** bootp-2.4.1.orig/hwaddr.h	Tue Aug 30 12:44:17 1994
--- bootp-2.4.1/hwaddr.h	Sat Aug 24 10:02:31 1996
***************
*** 24,28 ****
  #endif
  
! extern void setarp P((int, struct in_addr *, u_char *, int));
  extern char *haddrtoa P((u_char *, int));
  extern void haddr_conv802 P((u_char *, u_char *, int));
--- 24,28 ----
  #endif
  
! extern void setarp P((int, struct in_addr *, u_char *, int, u_char));
  extern char *haddrtoa P((u_char *, int));
  extern void haddr_conv802 P((u_char *, u_char *, int));

--
To unsubscribe:
mail -s unsubscribe redhat-devel-list-request@redhat.com < /dev/null

