Red Hat Bugzilla – Bug 138869
dhcp dumping code to screen during boot
Last modified: 2013-10-20 18:46:15 EDT
Description of problem:
During the boot process when it is bringing up the network interfaces
and, is paused waiting for a response from the dhcp server, if the
network connection drops (i.e. cable is removed) a short time later a
large amount of code/script is dumped to screen. It then displays
'Usage: ping' and the normal output of 'ping --help' before resuming
the boot process.
This does not appear in syslog etcetera. However it looks like
sections of /etc/sysconfig/network-scripts/network-functions
Version-Release number of selected component (if applicable):
Steps to Reproduce:
1. Set eth0 to use dhcp and activate at boot
3. As its trying to bring up eth0, remove network cable
4. Wait briefly
Actual Results: Large amounts of script dumped to screen, then boot
Expected Results: Notification of failure to bring up interface (i.e.
If an existing unexpired lease exists in
/var/lib/dhcp/dhclient-$IF.leases, and a DHCPDISCOVER to the
dhcp server times out, the dhclient-script attempts to ping
the default router specified in the last current lease; if this
fails (eg. because network cable is now unplugged), it correctly
exits and the red [ FAILED ] status does appear, with no ping usage
message on the console; otherwise it will re-use the unexpired lease.
If an unexpired lease exists, and your dhcp-server did not supply an
"routers" option with the unexpired lease, the dhclient-script will
get a '$new_routers' variable equal to '', causing it to
dump its environment and functions with the 'set $new_routers'
command, and will then try to ping '$1' (which is now ''), causing
the ping usage message to be emitted.
The next version of the dhclient-script will check if "$new_routers"
is empty and not attempt the 'set $new_routers' or 'ping $1' if so.
1. make your dhcp server always supply the routers option
2. remove /var/lib/dhcp/dhclient*.leases on a network stop /
3. set line 266 of /sbin/dhclient-script from:
' if [ x$reason = x$TIMEOUT ]; then
' if [ x$reason = x$TIMEOUT ] && [ "x$new_routers" != 'x' ]; then
I'll try to get this into RHEL-4-rc1, but it is rather late; else it
will have to wait for an update release.
This is now fixed in dhcp-3.0.1-12_EL (RHEL-4) and dhcp-3.0.1-12 (FC4).
Closing out. Please reopen if the problem is still present with recent code.