mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-20 05:21:59 -04:00
Add a configASSERT() that checks the gateway address is on the same subnet as the device in FreeRTOS+UDP.
This commit is contained in:
parent
94607d83f9
commit
6280324778
|
@ -581,6 +581,10 @@ static portBASE_TYPE xReturn = pdFALSE;
|
|||
#else
|
||||
{
|
||||
*ipLOCAL_IP_ADDRESS_POINTER = xNetworkAddressing.ulDefaultIPAddress;
|
||||
|
||||
/* Ensure the gateway is on the same subnet as the IP
|
||||
address. */
|
||||
configASSERT( ( ( *ipLOCAL_IP_ADDRESS_POINTER ) & xNetworkAddressing.ulNetMask ) == ( xNetworkAddressing.ulGatewayAddress & xNetworkAddressing.ulNetMask ) );
|
||||
}
|
||||
#endif /* ipconfigUSE_DHCP == 1 */
|
||||
|
||||
|
|
Loading…
Reference in a new issue