Bug 75

Summary: Netboot ignores gateway
Product: Base System Reporter: user <hench>
Component: miscAssignee: FreeBSD Core Team <core>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 2.0-RELEASE   
Hardware: Any   
OS: Any   

Description user 1994-12-21 01:10:25 UTC
	
	netboot.com is ignoring the gw= tag. it is only using the bp_giaddr
	field to set the gateway, which is fine if you boot thru a bootp gatway
	or off an HP box :-) the rfc sez that field is for bootp gatways but
	HP fills it in anyhow (rfc doesn't say no....)

Fix: 

add starting at line 578 in /usr/src/sys/i386/boot/netboot/main.c
this will cause the gw= tag to overide bp_giaddr.
(especially useful when bp_giaddr = 0.0.0.0

			case RFC1048_GATEWAY:
				convert_ipaddr(&arptable[ARP_GATEWAY].ipaddr, p+2);
				break;
How-To-Repeat: 
	Attempt to use a gateway before routed is started (say to mount /usr)
	bootp server running on non hp box. (say freebsd)
Comment 1 Poul-Henning Kamp freebsd_committer freebsd_triage 1995-11-06 17:28:45 UTC
State Changed
From-To: open->closed

Added suggested code.  Not tested, presumed OK.