Commit Graph

34 Commits

Author SHA1 Message Date
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 fa5ba918bb Error rewrites (#43)
* pcap: reuse Frame memory

* slog: reduce heap allocations of addresses; also prevent heap alloc of dhcp options in pcap

* dns: heapless improvement; add StackAsync buffer for more heapless operation; start thinking of errors

* errors: begin standardise errors in lneto

* errors: finish standardization of errors

* fix merge issues

* add more lneto errors to rest of package

* format errors.go
2026-02-28 16:18:27 -03:00
Pat Whittingslow 989bb6a0b9 Reduce heap allocs 2 (#46)
* reduce heap allocations in tcp logging; omit use of AppendFloat which allocates a metric sh*tton

* debugheaplog: better heap statistic logging

* heap: use string for pcap.Frame.Protocol

* add potential to eliminate Flags.String heap alloc, remove incorrect HEAP comments

* add StackAsync.DebugErr and httpraw.SetBytes

* many heap alloc reductions and replacement of bytes.Equal with internal.BytesEqual
2026-02-28 15:20:46 -03:00
Pat Whittingslow e13bb45854 attempt to fix #22 (#23) 2026-01-19 23:22:54 -03:00
Pat Whittingslow 7698b9fb81 do not rely on unspecified Go behaviour; fix TCP ring buffer bug (#16)
* do not rely on unspecified Go behaviour; fix TCP ring buffer bug

* even more stricter error handling on tcp connections

* stricter lock copying in tcp.Conn, even though likely not a problem

* add listener and tcp pool logging

* forgot reqAddr unused

* add logging to TCPConn and friends
2026-01-05 10:03:24 -03:00
Patricio Whittingslow c6e88b1c3b tcp.Conn:add Flush method and more lock protection 2026-01-01 10:32:13 -03:00
Patricio Whittingslow e3c6d68288 rigurously fix all tests 2025-11-05 20:12:02 -03:00
Patricio Whittingslow f5157e7e4a huge fixes to ring buffer implementations and mostly passing tests 2025-11-05 19:21:30 -03:00
Patricio Whittingslow 5e5f21a2b8 rethinking ring buffer semantics and breaking everything in the process 2025-11-05 02:35:53 -03:00
Patricio Whittingslow 82bd54a6da add faulty appendString method to rtx 2025-11-04 00:52:02 -03:00
Patricio Whittingslow 2b79b6a314 use sentlist in ringTx implementation and back to square 1 2025-11-03 23:51:05 -03:00
soypat 72047b8ae9 add test for sentlist 2025-11-03 19:04:23 -03:00
Patricio Whittingslow 26ef39ecc3 add sentlist 2025-10-30 23:32:22 -03:00
Patricio Whittingslow 71cf99dcb8 early return on partial packet ack 2025-10-29 18:06:38 -03:00
Patricio Whittingslow 46137bbbec begin adding TxQueue failing multipacket test 2025-10-27 23:21:41 -03:00
soypat 0f20090d78 bugfix: use ISS on active TCP connection 2025-08-16 18:26:50 -03:00
soypat 6b511999d1 begin testing tcp listener (not working) 2025-06-09 20:38:40 -03:00
soypat 523f609761 now supports partial packet acks 2025-02-16 14:47:02 -03:00
soypat 8a5f6f3f6d tcp:txqueue: rewrite RecvAck logic 2025-02-16 12:42:22 -03:00
soypat 00cdf471f4 rewrite txqueue sequencing logic to use per-packet sequence numbers 2025-02-15 17:02:10 -03:00
soypat aa8da93f6b fix tests finally 2025-02-08 16:06:14 -03:00
soypat e452ff0f0a keep fixing ring queue things 2025-02-08 01:33:26 -03:00
soypat 23cd71fcc8 rewrite most of txQueue.String; move around couple things 2025-02-05 01:39:26 -03:00
soypat c53596166c rewrite txqueue fields to use unsent/sent end+off values 2025-02-04 00:35:08 -03:00
soypat 6a30268f83 done for today :) 2025-01-26 19:02:16 -03:00
soypat 94c59ee84e segment Ring tests more: add TwoWrite,Empty,NonEmpty 2025-01-26 12:19:29 -03:00
soypat 0a63cb6b40 keep working on queue buffer 2025-01-25 09:15:50 -03:00
soypat 8191874c49 fix codecov yaml 2025-01-24 22:44:19 -03:00
soypat 83719ffe98 fix tests not passing for RingTx 2025-01-24 21:46:39 -03:00
soypat 51ca0a95b5 rephrase tcp.Value methods; add Ring.FreeLimited; work on TxQueue 2025-01-18 09:30:36 -03:00
soypat 0a75ef4670 txqueue work 2025-01-13 19:36:17 -03:00
soypat 9abf0c11b9 restructure package, rename module/repo 2025-01-07 11:34:35 -03:00