Re: [lwip-users] Randomized initial local port in tcp_connect()

2017-08-07 Thread Jan Menzel
Hi Gus! You also need to define LWIP_RAND to a rand()-like function which will be called to get the next random number. This number is used to initial the local port. Only if both (LWIP_RAND and LWIP_RANDOMIZE_INITIAL_LOCAL_PORTS) are defined, UDP (udp.c line 98) and TCP (tcp.c line 144) us

[lwip-users] Randomized initial local port in tcp_connect()

2017-08-06 Thread gussabina
Hello: I noticed the tcp_connect() function always use the same local (ephemeral) port, rather than choosing a random port from a range of available ports. This causes problem connecting to the same server as they might think it's part of the previous connection if not closed properly. I already