fix(connlib): ensure we don't mistake SYN-ACK for SYN (#8922)

This shouldn't matter because we are only using the `UniquePacketBuffer`
on the client and not on the Gateway where SYN-ACK packets would be sent
from. To be fully correct though, we need to also compare the ACK flag
of the two packets.
This commit is contained in:
Thomas Eizinger
2025-04-29 14:17:18 +10:00
committed by GitHub
parent fde8d08423
commit 66b7ca6f7f

View File

@@ -74,7 +74,9 @@ fn is_tcp_syn_retransmit(buffered: &IpPacket, new: &IpPacket) -> bool {
};
buffered.syn()
&& !buffered.ack()
&& new.syn()
&& !new.ack()
&& buffered.source_port() == new.source_port()
&& buffered.destination_port() == new.destination_port()
&& buffered.sequence_number() == new.sequence_number()