<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<span style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);" class="">Hi,</span>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">I wrote a small dtrace script to track ECN connections on MacOS.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">It basically dumps the ecn_flags from the MacOS kernel to find out if ECN was successfully negotiated or not.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">It further counts ECN bits on incoming packets.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">For anyone interested (feel free to share), the code is here:</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><a href="https://github.com/janrueth/macos-passive-ecn-sniffer" class="">https://github.com/janrueth/macos-passive-ecn-sniffer</a></div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">During testing I also observed a weird behavior (connections fail) between MacOS and Linux when ECN flags cause packet drops on the downlink (reverse) path.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">There is also a more detailed description and a packet trace of this happening in the github repository.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">If you have any comments, feel free to contact me.</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"><br class="">
</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);">Best</div>
<div class="" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0);"> Jan</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On 9. Mar 2021, at 21:38, Dave Taht <<a href="mailto:dave.taht@gmail.com" class="">dave.taht@gmail.com</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="">The additional sysctl required to re-enable ecn negotiation always is<br class="">
<br class="">
sudo sysctl -w net.inet.tcp.disable_tcp_heuristics=1<br class="">
<br class="">
See also:<br class="">
<a href="https://github.com/apple-opensource/xnu/blob/master/bsd/netinet/tcp_cache.c#L164" class="">https://github.com/apple-opensource/xnu/blob/master/bsd/netinet/tcp_cache.c#L164</a><br class="">
<br class="">
It disables mptcp and tfo, which for purposes of even basic worldwide<br class="">
testing of the survival of the ect(0) and ect(1) codepoints, don't<br class="">
really matter. I am delirious with joy to be able to test this stuff<br class="">
again from devices more people have, and I hope y'all turn it on for a<br class="">
while, on ethernet/wifi and lte, get a bunch of captures and see what<br class="">
happens in day to day use. I would so love packet captures from many<br class="">
many vantage points against the worldwide flent testing network.<br class="">
<br class="">
Those of you that have root access on your iphones can also test ecn<br class="">
in this way.<br class="">
<br class="">
A huge thanks to Christoph Paasch over at apple for pointing this out.<br class="">
<br class="">
-- <br class="">
"For a successful technology, reality must take precedence over public<br class="">
relations, for Mother Nature cannot be fooled" - Richard Feynman<br class="">
<br class="">
dave@taht.net <Dave Täht> CTO, TekLibre, LLC Tel: 1-831-435-0729<br class="">
_______________________________________________<br class="">
Ecn-sane mailing list<br class="">
Ecn-sane@lists.bufferbloat.net<br class="">
https://lists.bufferbloat.net/listinfo/ecn-sane<br class="">
</div>
</div>
</blockquote>
</div>
<br class="">
</body>
</html>