Set Ethernet TCP layer default SOURCE PORT

V.Severino
Posts: 2
Joined: Wed Sep 13, 2023 11:39 am

Set Ethernet TCP layer default SOURCE PORT

Postby V.Severino » Wed Sep 13, 2023 12:47 pm

Does anyone know if is there a ESP-IDF "tool" able to interact directly to the Ethernet TCP layer where I can set a default SOURCE PORT to the packages leaving ESP32?

When "sniffing" the packets, I noticed that the source port changes dynamically when certain events happen (e.g. system reboots)...
This scenario makes me a bit concerned as the solution I am developing may be installed on environments with Ethernet traffic controlled by safety policies. I mean... gateway output ports may be blocked... So, in this case I should have a solution to present (assign a fixed output port and advice the users know about it seems a reasonable solution... I guess)
Thanks in advance!

ESP_Sprite
Posts: 9739
Joined: Thu Nov 26, 2015 4:08 am

Re: Set Ethernet TCP layer default SOURCE PORT

Postby ESP_Sprite » Thu Sep 14, 2023 1:31 am

Picking a random source port is more or less standard behaviour of all OSses (Linux, Mac, OSX) so I'd be very surprised if that would lead to any issues (see e.g. here.)

V.Severino
Posts: 2
Joined: Wed Sep 13, 2023 11:39 am

Re: Set Ethernet TCP layer default SOURCE PORT

Postby V.Severino » Thu Sep 14, 2023 12:45 pm

ESP_Sprite wrote:
Thu Sep 14, 2023 1:31 am
Picking a random source port is more or less standard behaviour of all OSses (Linux, Mac, OSX) so I'd be very surprised if that would lead to any issues (see e.g. here.)

hummmm.... interesting. I have had completely ignored the Ephemeral port standardization... That is a point to consider.
Perhaps I am concerning for nothing.
Really appreciated. Thanks!

Who is online

Users browsing this forum: No registered users and 116 guests