Browse Source

[pxe] Fall back to broadcast if no boot server multicast address exists

fetch_ipv4_setting() will zero its IPv4 address argument if no such
setting exists, rather than leaving it untouched.
tags/v0.9.7
Michael Brown 16 years ago
parent
commit
4b276b8df9
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      src/usr/pxemenu.c

+ 2
- 1
src/usr/pxemenu.c View File

@@ -95,8 +95,9 @@ static int pxe_menu_parse ( struct pxe_menu **menu ) {
95 95
 
96 96
 	/* Fetch relevant settings */
97 97
 	tmp_setting.tag = DHCP_PXE_BOOT_SERVER_MCAST;
98
-	server.s_addr = INADDR_BROADCAST;
99 98
 	fetch_ipv4_setting ( NULL, &tmp_setting, &server );
99
+	if ( ! server.s_addr )
100
+		server.s_addr = INADDR_BROADCAST;
100 101
 	tmp_setting.tag = DHCP_PXE_BOOT_MENU_PROMPT;
101 102
 	fetch_setting ( NULL, &tmp_setting, &prompt, sizeof ( prompt ) );
102 103
 	tmp_setting.tag = DHCP_PXE_BOOT_MENU;

Loading…
Cancel
Save