Files
RedBear-OS/netstack
Red Bear OS d51320ebff conntrack: fin_from_orig tracking + TCP state in format output
ConnEntry gains fin_from_orig: bool field to track which direction
sent the first FIN. This enables correct TimeWait transition:
FinWait→TimeWait now only fires when the OPPOSITE direction sends
FIN (not when the same side retransmits).

Per Linux nf_conntrack_proto_tcp.c:
- fin_from_orig=true means orig sent first FIN
- TimeWait transition requires reply FIN next
- fin_from_orig=false means reply sent first FIN
- TimeWait transition requires orig FIN next

TCP state now included in format() output:
  Established tcp=Established src=10.0.0.1 dst=10.0.0.2 sport=80 dport=1234 ...
  New tcp=SynSent src=...
  Established tcp=TimeWait src=...

All 31 tests pass.
2026-07-09 01:33:26 +03:00
..