summaryrefslogtreecommitdiffstats
path: root/src/usr/dhcpmgmt.c
diff options
context:
space:
mode:
authorMichael Brown2007-01-16 05:09:13 +0100
committerMichael Brown2007-01-16 05:09:13 +0100
commitf11da20f25ce4535f2731e403071b03f7118d40f (patch)
treeb9b42be84a4d0c071ad2434805ff0651ecb84665 /src/usr/dhcpmgmt.c
parentImprove debugging (diff)
downloadipxe-f11da20f25ce4535f2731e403071b03f7118d40f.tar.gz
ipxe-f11da20f25ce4535f2731e403071b03f7118d40f.tar.xz
ipxe-f11da20f25ce4535f2731e403071b03f7118d40f.zip
When a network device is specified to tcpip_tx() or it's children, treat
it as a fallback network device rather than an explicitly forced network device. Clear routing table entries before re-attempting DHCP.
Diffstat (limited to 'src/usr/dhcpmgmt.c')
-rw-r--r--src/usr/dhcpmgmt.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/usr/dhcpmgmt.c b/src/usr/dhcpmgmt.c
index 0e36d555..90ed62bf 100644
--- a/src/usr/dhcpmgmt.c
+++ b/src/usr/dhcpmgmt.c
@@ -58,6 +58,9 @@ int dhcp ( struct net_device *netdev ) {
dhcp_options = NULL;
}
+ /* Clear any existing routing table entry */
+ del_ipv4_address ( netdev );
+
/* Issue DHCP request */
printf ( "DHCP (%s %s)...", netdev->name, netdev_hwaddr ( netdev ) );
memset ( &dhcp, 0, sizeof ( dhcp ) );