[gPXE-devel] [PATCH] Fix autoboot for multiple NIC's on different networks
Gianni Tedesco
gianni.tedesco at citrix.com
Wed Jul 7 11:35:48 EDT 2010
Hi,
Without this patch retrieving boot image from the second "next-server"
and "filename" actually ends up using the results obtained from DHCP on
the first NIC after boot either fails or continues.
Signed-off-by: Gianni Tedesco <gianni.tedesco at citrix.com>
src/usr/autoboot.c | 6 ++++--
1 files changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/usr/autoboot.c b/src/usr/autoboot.c
index d76751b..439860e 100644
--- a/src/usr/autoboot.c
+++ b/src/usr/autoboot.c
@@ -171,8 +171,8 @@ static int netboot ( struct net_device *netdev ) {
}
/* Try to download and boot whatever we are given as a filename */
- fetch_ipv4_setting ( NULL, &next_server_setting, &next_server );
- fetch_string_setting ( NULL, &filename_setting, buf, sizeof ( buf ) );
+ fetch_ipv4_setting ( netdev_settings(netdev), &next_server_setting,
&next_server );
+ fetch_string_setting ( netdev_settings(netdev), &filename_setting,
buf, sizeof ( buf ) );
if ( buf[0] ) {
printf ( "Booting from filename \"%s\"\n", buf );
if ( ( rc = boot_next_server_and_filename ( next_server,
@@ -228,6 +228,8 @@ void autoboot ( void ) {
if ( ( boot_netdev = find_boot_netdev() ) )
netboot ( boot_netdev );
+ netdev_close(boot_netdev);
+
/* If that fails, try booting from any of the other devices */
for_each_netdev ( netdev ) {
if ( netdev == boot_netdev )
More information about the gPXE-devel
mailing list