|
@@ -845,16 +845,20 @@ static void dhcp_rx_proxydhcpack ( struct dhcp_session *dhcp,
|
845
|
845
|
struct in_addr ack_server_id = { 0 };
|
846
|
846
|
int rc;
|
847
|
847
|
|
848
|
|
- /* Verify server ID matches */
|
|
848
|
+ /* Verify server ID matches, if present */
|
849
|
849
|
assert ( dhcp->proxydhcpoffer != NULL );
|
850
|
|
- dhcppkt_fetch ( &dhcp->proxydhcpoffer->dhcppkt, DHCP_SERVER_IDENTIFIER,
|
851
|
|
- &offer_server_id, sizeof ( offer_server_id ) );
|
852
|
|
- dhcppkt_fetch ( &proxydhcpack->dhcppkt, DHCP_SERVER_IDENTIFIER,
|
853
|
|
- &ack_server_id, sizeof ( ack_server_id ) );
|
854
|
|
- if ( offer_server_id.s_addr != ack_server_id.s_addr ) {
|
855
|
|
- DBGC ( dhcp, "DHCP %p ignoring ProxyDHCPACK with wrong server "
|
856
|
|
- "ID %s\n", dhcp, inet_ntoa ( ack_server_id ) );
|
857
|
|
- return;
|
|
850
|
+ if ( ( rc = dhcppkt_fetch ( &proxydhcpack->dhcppkt,
|
|
851
|
+ DHCP_SERVER_IDENTIFIER, &ack_server_id,
|
|
852
|
+ sizeof ( ack_server_id ) ) ) > 0 ) {
|
|
853
|
+ dhcppkt_fetch ( &dhcp->proxydhcpoffer->dhcppkt,
|
|
854
|
+ DHCP_SERVER_IDENTIFIER, &offer_server_id,
|
|
855
|
+ sizeof ( offer_server_id ) );
|
|
856
|
+ if ( offer_server_id.s_addr != ack_server_id.s_addr ) {
|
|
857
|
+ DBGC ( dhcp, "DHCP %p ignoring ProxyDHCPACK with "
|
|
858
|
+ "wrong server ID %s\n",
|
|
859
|
+ dhcp, inet_ntoa ( ack_server_id ) );
|
|
860
|
+ return;
|
|
861
|
+ }
|
858
|
862
|
}
|
859
|
863
|
|
860
|
864
|
/* Rename settings */
|