Hello, I've been reading the code in tcp_input.c, and am a bit puzzled by the code ifdef'ed under TCP_ECN.
There's something which seems odd to me with the places in the code which update tp->snd_last, and their relation to TCP_ECN and TCP_SACK. I'll be grateful if someone could take the time and explain it in a few words. In this email I'm referring to line numbers as they appear today in http://fxr.watson.org/fxr/source/netinet/tcp_input.c?v=OPENBSD;im=excerpts In syn_cache_get(), line 3777, for new connections, snd_last = snd_und, for both TCP_ECN and TCP_SACK. That makes sense to me. In tcp_input(), line 1868, handling of old/dup ACK - snd_last = snd_una, if snd_una > snd_last. That makes sense, to handle wrap-around. But, I don't quite understand why this under ifdef of TCP_ECN, and not TCP_ECN | TCP_SACK. In tcp_input(), lines 1051-1054 - handling of normal pure ACK - snd_last = snd_una as before, but the if statement is done only ifdef TCP_ECN. Again I don't understand why only TCP_ECN and not TCP_ENC | TCP_SACK. What's more puzzling to me is why the if statement if under an ifdef, while the action is not. Thanks, David Bar david dot bar at gmail dot com