Commit Graph

25 Commits

Author SHA1 Message Date
Pat Whittingslow a2970b923d add ipv6 to xnet.StackAsync (#107)
* add ipv6 to xnet.StackAsync

* dns improvements

* improve DNS workings of StackAsync

* add tentative ICMPv6

* work on prefixes and fix some small bugs, plan UDP/TCP6

* fix bugs in StackAsync and ipv4.Prefix.Contains

* update arpsubtable

* completely remove legacy internet.StackIP for StackIPv4/v6

* ipv4/ipv6 tcp/udp

* add TCP6/UDP6 dialing APIs

* add xnet.Stack6 interface

* more ipv6 integration into StackAsync; various tweaks to lneto and documentation+TODOs

* add stack6 tests

* replace netip.Prefix with ipv4.Prefix where it makes sense
2026-05-13 15:31:18 -03:00
Patricio Whittingslow 9e4da57335 abort on ControlBlock return net.ErrClosed in challenge ack case 2026-04-11 20:02:16 -03:00
Pat Whittingslow 54bc52d9d8 Fuzz fixes (#73)
* remove old fuzz corpus and stick to using PCG for seeding fuzz test

* polish up drain logic and reduce action search space

* improve fuzzing debug prints

* more fuzz fixes also formatter capture printer fixes

* refactor StackSeeded test

* fix challenge ack infinite packet bug

* more expressive challenge satisfy

* remove printing
2026-04-11 18:01:05 -03:00
Pat Whittingslow 64b2647a5e tcp: retransmit logic rollback (#61)
* tcp: remove retransmit logic entirely; add duplicate ack counting to ControlBlock

* retransmit implemented in nice simple straightforward way

* narrow down retransmission cases

* remove old timing tests

* add ControlBlock retransmit test

* add failing handler test

* reworking payload length semantic meaning in code

* fix establish conn logic

* clean up tests and add TCB dupack generation and test it

* catch pending retransmit satisfy in test

* add fuzz test for control block

* bugfix: be more strict in what is considered dupack

* add IncomingIsDupACK docs

* limit queue of retransmits

* protect retransmit overflow from incorrectly updating nxt
2026-03-26 11:48:02 -03:00
Pat Whittingslow faae7ab076 TCP retransmission fixes and fuzz failure fixes (#59)
* fix for #58

* add fixes for both retransmit and fuzz failure found

* fix infinite challenge ack due to RST+SYN+FIN corrupt packet in SYNRCV state

* fuzz: previous recovery ack path led to infinite transmit

* fuzz: calculate CRCs when fuzzing to reduce search space to non-CRC error cases

* add local fuzz corpus to tests

* add more cases to fuzz corpus
2026-03-20 10:25:31 -03:00
Pat Whittingslow 270b8df043 Implement basic retransmit queue reset method (#52)
* implement basic retransmit queue reset method

* tcp: rto reset on new ack; accept ack after retransmit bugfix
2026-03-05 17:35:16 -03:00
Pat Whittingslow d5c4fa53c6 tcp: bugfix for seq not in snd/rcv.wnd error (#49)
* tcp: bugfix for seq not in snd/rcv.wnd error

* accept dupe ACKs for window updates and prevent decrement of UNA

* add fixes for incorrect tcp functioning

* remove Conn.Available* methods in favor of Conn.Free* methods due to ambiguous name
2026-03-04 12:59:30 -03:00
Pat Whittingslow 3d0bc93cbe tcp: bugfix for missing ack for window rejected segments (#45) 2026-02-28 15:21:07 -03:00
Pat Whittingslow eab43c4653 tcp: Reject SYN on synchronized connections; fix maxSend underflow (#44)
* tcp: add test replicating bugs and 32bit panic with GOARCH=386

* tcp: reject SYN on synchronized connections; fix maxSend underflow
2026-02-27 12:38:46 -03:00
Pat Whittingslow be949d960c tcp: mss honoring; accept syn with ECE/CWR flags; add RSTQueue type (#41)
* tcp: mss honoring; accept syn with ECE/CWR flags; add RSTQueue type

* tcp: move option logic to own file

* remove prints in pcap

* add MSS send threshold inspired by linux/freebsd/lwip thresh
2026-02-25 12:58:55 -03:00
Pat Whittingslow 7d323aae19 Tcp rst handling (#40)
* claude suggests a way forward

* add timing to capture printer

* add pcap.Flags

* fix ICMP CRC calculation and add test

* bugfix: still send data on half-close state(close-wait)

* fix pcap test
2026-02-23 09:50:13 -03:00
Pat Whittingslow 018f9258ac Add tcp.Listener (#15)
* begin reviewing TCP listener

* begin adding listener tests

* adding TestExchange implementation

* split out legacy and Step tests

* move listener to tcp package

* fix up tcp tests taking very long

* add xnet.TCPPool and work on TCPPool semantics

* xnet: TCPPool only accepts established connections

* xnet: getting to bottom of panic in xnet.Listener

* xnet: improve listener tests

* fix several data races in testing fixtures

* fix more synchronization things in listener test

* finalize tcplistener test
2026-01-03 12:41:57 -03:00
Patricio Whittingslow ed81d7446d fix client reset state; add multi send tests 2025-10-26 20:45:23 -03:00
soypat 3fa2f32737 fix timewait not counting as closed state in listen open; add second part to test 2025-10-24 18:26:59 -03:00
soypat 407f4a08f1 enhance xnet StackAsync test and add non-linux stubs for Tap and Bridge 2025-10-21 21:46:44 -03:00
soypat 9a60642283 mega refactor internet.TCPConn->tcp.Conn 2025-06-07 20:43:20 -03:00
soypat 6ba727a0ef more effort into understanding why TAP interface is so slow on my linux machine to no avail 2025-06-05 00:47:07 -03:00
soypat d04d287ab6 clean up tcp package; add Abort method 2025-02-24 09:25:55 -03:00
soypat 2e823c0fd5 begin add tcp.Handler tests 2025-02-15 11:15:19 -03:00
soypat 6b91d8e510 handle clientsynseg 2025-02-13 23:19:19 -03:00
soypat bbd74d04d8 rewrite ControlBlock.Open to only open passive connections; now use Send for active connections 2025-02-13 22:56:27 -03:00
soypat 0cb43c47a4 tcpHandler looks rounded off, add to example 2025-02-10 20:26:02 -03:00
soypat 64a7102064 continue adding Handler logic; remove unused TxQueue tests 2025-02-09 23:43:30 -03:00
soypat 51ca0a95b5 rephrase tcp.Value methods; add Ring.FreeLimited; work on TxQueue 2025-01-18 09:30:36 -03:00
soypat 9abf0c11b9 restructure package, rename module/repo 2025-01-07 11:34:35 -03:00