Bug 13863

Summary: dhclient-script doesn't update route if no address change
Product: Base System Reporter: Andrew Reilly <a.reilly>
Component: confAssignee: David E. O'Brien <obrien>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-STABLE   
Hardware: Any   
OS: Any   

Description Andrew Reilly 1999-09-21 00:00:01 UTC
	when the internet provider changes the netmask from /24
	to /22, and simultaneously changes the gateway router
	address, but does NOT change the client (my) IP address,
	then /etc/dhclient-script does not adjust the default
	route.  The environment for dhclient-script was:

	new_ip_address=24.192.49.170
	new_network_number=24.192.48.0
	new_dhcp_message_type=5
	old_dhcp_lease_time=21600
	new_server_name=m3.c2.telstra-mm.net.au
	old_ip_address=24.192.49.170
	old_network_number=24.192.49.0
	old_dhcp_message_type=5
	new_routers=24.192.48.1
	old_server_name=(null)
	new_subnet_mask=255.255.252.0
	new_expiry=937884283
	interface=ed1
	old_routers=24.192.49.1
	new_domain_name=c2.telstra-mm.net.au
	reason=BOUND
	old_subnet_mask=255.255.255.0
	old_expiry=937868680
	old_domain_name=c2.telstra-mm.net.au
	PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/local/sbin:/usr/local/bin:/usr/X11R6/bin
	new_dhcp_server_identifier=24.192.3.18
	new_domain_name_servers=24.192.3.18
	new_broadcast_address=24.192.51.255
	old_dhcp_server_identifier=24.192.3.18
	new_dhcp_renewal_time=10800
	new_dhcp_rebinding_time=17280
	old_domain_name_servers=24.192.3.18
	old_broadcast_address=24.192.49.255
	old_dhcp_renewal_time=10800
	old_dhcp_rebinding_time=17280
	new_dhcp_lease_time=21600

Fix: 

the for "router in $new_routers; do" loop in the
	"if [ x$reason = xBOUND ] block should somehow be
	promoted out of that condition, so that it is run
	whenever the router address changes.
How-To-Repeat: 
	I imagine you could load the environment above, then run
	dhclient-script manually.  Being in charge of a
	DHCP-based network would otherwise be required.
Comment 1 Sheldon Hearn freebsd_committer freebsd_triage 1999-09-21 07:57:10 UTC
Responsible Changed
From-To: freebsd-bugs->obrien

DHCP is one of David's many babies. :-) 

Comment 2 patrick 1999-12-09 06:45:27 UTC
Hi,

The replacement script for /sbin/dhclient-script submitted in PR bin/15342
fixes that problem.

Patrick.

--
www.mindstep.com
Comment 3 David E. O'Brien freebsd_committer freebsd_triage 2000-11-10 18:29:32 UTC
State Changed
From-To: open->closed

I have synced the FreeBSD dhclient 2.0 script with the ISC version 3 one. 
If you still have a problem, needed changes should be addressed to the 
ISC DHCP developers.