|
@@ -670,8 +670,13 @@ static int dhcp_pxebs_tx ( struct dhcp_session *dhcp,
|
670
|
670
|
struct dhcp_pxe_boot_menu_item menu_item = { 0, 0 };
|
671
|
671
|
int rc;
|
672
|
672
|
|
|
673
|
+ /* Set server address */
|
|
674
|
+ peer->sin_addr = *(dhcp->pxe_attempt);
|
|
675
|
+ peer->sin_port = ( ( peer->sin_addr.s_addr == INADDR_BROADCAST ) ?
|
|
676
|
+ htons ( BOOTPS_PORT ) : htons ( PXE_PORT ) );
|
|
677
|
+
|
673
|
678
|
DBGC ( dhcp, "DHCP %p PXEBS REQUEST to %s:%d for type %d\n",
|
674
|
|
- dhcp, inet_ntoa ( *(dhcp->pxe_attempt) ), PXE_PORT,
|
|
679
|
+ dhcp, inet_ntoa ( peer->sin_addr ), ntohs ( peer->sin_port ),
|
675
|
680
|
ntohs ( dhcp->pxe_type ) );
|
676
|
681
|
|
677
|
682
|
/* Set boot menu item */
|
|
@@ -680,10 +685,6 @@ static int dhcp_pxebs_tx ( struct dhcp_session *dhcp,
|
680
|
685
|
&menu_item, sizeof ( menu_item ) ) ) != 0 )
|
681
|
686
|
return rc;
|
682
|
687
|
|
683
|
|
- /* Set server address */
|
684
|
|
- peer->sin_addr = *(dhcp->pxe_attempt);
|
685
|
|
- peer->sin_port = htons ( PXE_PORT );
|
686
|
|
-
|
687
|
688
|
return 0;
|
688
|
689
|
}
|
689
|
690
|
|
|
@@ -743,7 +744,8 @@ static void dhcp_pxebs_rx ( struct dhcp_session *dhcp,
|
743
|
744
|
DBGC ( dhcp, "\n" );
|
744
|
745
|
|
745
|
746
|
/* Filter out unacceptable responses */
|
746
|
|
- if ( peer->sin_port != htons ( PXE_PORT ) )
|
|
747
|
+ if ( ( peer->sin_port != htons ( BOOTPS_PORT ) ) &&
|
|
748
|
+ ( peer->sin_port != htons ( PXE_PORT ) ) )
|
747
|
749
|
return;
|
748
|
750
|
if ( msgtype != DHCPACK )
|
749
|
751
|
return;
|