diff options
author | Michael Brown | 2009-02-05 10:30:32 +0100 |
---|---|---|
committer | Michael Brown | 2009-02-05 10:34:32 +0100 |
commit | 881f1f59ef2abb9b0e9c5a56730a22fb9094b84c (patch) | |
tree | 589ef6553912e55d8ae56d666d5765f179666a7c /src/usr/pxemenu.c | |
parent | [pxe] Skip PXE boot server discovery if directed to do so (diff) | |
download | ipxe-881f1f59ef2abb9b0e9c5a56730a22fb9094b84c.tar.gz ipxe-881f1f59ef2abb9b0e9c5a56730a22fb9094b84c.tar.xz ipxe-881f1f59ef2abb9b0e9c5a56730a22fb9094b84c.zip |
[pxe] Obey lists of PXE Boot Servers and associated Discovery Control bits
Various combinations of options 43.6, 43.7 and 43.8 dictate which
servers we send Boot Server Discovery requests to, and which servers
we should accept responses from. Obey these options, and remove the
explicit specification of a single Boot Server from start_pxebs() and
dependent functions.
Diffstat (limited to 'src/usr/pxemenu.c')
-rw-r--r-- | src/usr/pxemenu.c | 12 |
1 files changed, 1 insertions, 11 deletions
diff --git a/src/usr/pxemenu.c b/src/usr/pxemenu.c index ae971088..4cc40a65 100644 --- a/src/usr/pxemenu.c +++ b/src/usr/pxemenu.c @@ -57,8 +57,6 @@ struct pxe_menu_item { * options. */ struct pxe_menu { - /** Boot Server address */ - struct in_addr server; /** Timeout (in seconds) * * Negative indicates no timeout (i.e. wait indefinitely) @@ -83,7 +81,6 @@ struct pxe_menu { */ static int pxe_menu_parse ( struct pxe_menu **menu ) { struct setting tmp_setting = { .name = NULL }; - struct in_addr server; struct dhcp_pxe_boot_menu_prompt prompt = { .timeout = 0 }; uint8_t raw_menu[256]; int raw_menu_len; @@ -94,10 +91,6 @@ static int pxe_menu_parse ( struct pxe_menu **menu ) { int rc; /* Fetch relevant settings */ - tmp_setting.tag = DHCP_PXE_BOOT_SERVER_MCAST; - fetch_ipv4_setting ( NULL, &tmp_setting, &server ); - if ( ! server.s_addr ) - server.s_addr = INADDR_BROADCAST; tmp_setting.tag = DHCP_PXE_BOOT_MENU_PROMPT; fetch_setting ( NULL, &tmp_setting, &prompt, sizeof ( prompt ) ); tmp_setting.tag = DHCP_PXE_BOOT_MENU; @@ -142,7 +135,6 @@ static int pxe_menu_parse ( struct pxe_menu **menu ) { } /* Fill in parsed menu */ - (*menu)->server = server; (*menu)->timeout = ( ( prompt.timeout == 0xff ) ? -1 : prompt.timeout ); (*menu)->num_items = num_menu_items; @@ -296,7 +288,6 @@ int pxe_menu_select ( struct pxe_menu *menu ) { */ int pxe_menu_boot ( struct net_device *netdev ) { struct pxe_menu *menu; - struct in_addr pxe_server; unsigned int pxe_type; struct settings *pxebs_settings; struct in_addr next_server; @@ -312,7 +303,6 @@ int pxe_menu_boot ( struct net_device *netdev ) { free ( menu ); return rc; } - pxe_server = menu->server; pxe_type = menu->items[menu->selection].type; /* Free boot menu */ @@ -323,7 +313,7 @@ int pxe_menu_boot ( struct net_device *netdev ) { return 0; /* Attempt PXE Boot Server Discovery */ - if ( ( rc = pxebs ( netdev, pxe_server, pxe_type ) ) != 0 ) + if ( ( rc = pxebs ( netdev, pxe_type ) ) != 0 ) return rc; /* Attempt boot */ |