EthernetENC icon indicating copy to clipboard operation
EthernetENC copied to clipboard

Port Reuse on TCP Connections

Open N0W0RK opened this issue 1 year ago • 2 comments

In my development Process with frequent restarting, I experienced issues with working code breaking after resetting or flashing. After some Packet inspection with Wireshark, I figured out, that upon reset, the same sourcePort is used. THis however can be misinterpretedby the Server as an out of Sequence packet or simmilar. This could also be the source of the issues described in #30 .

A simple Fix would be to set the lastport Variable randomly in uip.c.

N0W0RK avatar Nov 11 '23 22:11 N0W0RK

I think it is only a problem of WireShark

JAndrassy avatar Nov 12 '23 10:11 JAndrassy

My uvicorn server did not like this aswell. According to RFC 9293 Servers are supposed to keep quiet upon port and sequence number duplication.

So it is not necessarily braking the protocoll but making life siginificantly harder.

N0W0RK avatar Nov 12 '23 21:11 N0W0RK