remove LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS config option (this is implicitly done via #ifdef LWIP_RAND)

This commit is contained in:
goldsimon 2017-03-24 14:29:06 +01:00
parent a2bc02d682
commit 540b527cf4
3 changed files with 4 additions and 13 deletions

View File

@ -144,9 +144,9 @@ static err_t tcp_close_shutdown_fin(struct tcp_pcb *pcb);
void
tcp_init(void)
{
#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND)
#ifdef LWIP_RAND
tcp_port = TCP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */
#endif /* LWIP_RAND */
}
/**

View File

@ -86,9 +86,9 @@ struct udp_pcb *udp_pcbs;
void
udp_init(void)
{
#if LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND)
#ifdef LWIP_RAND
udp_port = UDP_ENSURE_LOCAL_PORT_RANGE(LWIP_RAND());
#endif /* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS && defined(LWIP_RAND) */
#endif /* LWIP_RAND */
}
/**

View File

@ -748,15 +748,6 @@
#if !defined IP_FORWARD_ALLOW_TX_ON_RX_NETIF || defined __DOXYGEN__
#define IP_FORWARD_ALLOW_TX_ON_RX_NETIF 0
#endif
/**
* LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS==1: randomize the local port for the first
* local TCP/UDP pcb (default==0). This can prevent creating predictable port
* numbers after booting a device.
*/
#if !defined LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS || defined __DOXYGEN__
#define LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS 0
#endif
/**
* @}
*/