LWN: Comments on "Better visibility into packet-dropping decisions" https://lwn.net/Articles/885729/ This is a special feed containing comments posted to the individual LWN article titled "Better visibility into packet-dropping decisions". en-us Mon, 01 Sep 2025 00:00:09 +0000 Mon, 01 Sep 2025 00:00:09 +0000 https://www.rssboard.org/rss-specification lwn@lwn.net Better visibility into packet-dropping decisions https://lwn.net/Articles/900228/ https://lwn.net/Articles/900228/ gdt <div class="FormattedComment"> Even using a silly MD5 password is worthwhile, since the spray of failed MD5 packets (and thus log messages) prior to the BGP connection reset make it plain that the cause is network abuse. <br> Cynically, if the BGP connection isn&#x27;t using a long, random, unique key prior to that outage, then it will be afterwards :-)<br> <p> Linux counting failed MD5 packets is excellent, as network operators investigating BGP connection issues can check that the counter is the expected zero.<br> <p> For the longest time vendors were promoting IPsec as the replacement for the TCP MD5 option, but operationally the overhead of configuration and customer education was too high. More recently TCP-AO (Authentication Option) offers a similar mechanism to the MD5 option, but with modern cyrptographic algorithms.<br> <p> For external BGP connections the TTL security check also offers good protection from network abuse. Customers generally seem to be able to configure that without much difficulty.<br> </div> Thu, 07 Jul 2022 06:48:15 +0000 return -Exxxxx; https://lwn.net/Articles/887577/ https://lwn.net/Articles/887577/ njs <div class="FormattedComment"> Someone actually implemented this and released the patches so you can to:<br> <p> <a rel="nofollow" href="https://github.com/nviennot/linux-trace-error">https://github.com/nviennot/linux-trace-error</a><br> <p> </div> Fri, 11 Mar 2022 08:44:05 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/887349/ https://lwn.net/Articles/887349/ rstonehouse <div class="FormattedComment"> See <a href="https://github.com/idosch/mlxsw-1/wiki/Packet-Drops-Monitoring">https://github.com/idosch/mlxsw-1/wiki/Packet-Drops-Monit...</a> which talks about using <a href="https://github.com/nhorman/dropwatch">https://github.com/nhorman/dropwatch</a><br> <p> (Also there is a systemtap script to do something similar. See <a href="https://sourceware.org/git/?p=systemtap.git;a=blob;f=testsuite/systemtap.examples/network/dropwatch.stp;hb=HEAD">https://sourceware.org/git/?p=systemtap.git;a=blob;f=test...</a>)<br> <p> <p> </div> Wed, 09 Mar 2022 17:55:45 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886953/ https://lwn.net/Articles/886953/ gfa <div class="FormattedComment"> <font class="QuotedText">&gt; The kernel currently contains a &quot;drop_monitor&quot; functionality that was introduced in the 2.6.30 kernel back in 2009</font><br> <p> Does anybody know any tool that can use this functionality?<br> <p> thanks<br> </div> Sun, 06 Mar 2022 20:16:13 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886532/ https://lwn.net/Articles/886532/ amarao <div class="FormattedComment"> I do understand you. When a new session is agreed with a party, a password is provided together with IP and AS number. Even md5 is considered hopelessly broken, for the sake of RST protection it is more than enough, because even 32 additional bits pushes attack from `feasible` to `unfeasible` realm.<br> </div> Wed, 02 Mar 2022 09:58:17 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886520/ https://lwn.net/Articles/886520/ MaZe <div class="FormattedComment"> eh, most uses of tcp md5 are pretty pointless because they just use well known passwords...<br> </div> Wed, 02 Mar 2022 03:25:24 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886307/ https://lwn.net/Articles/886307/ amarao <div class="FormattedComment"> Md5 for TCP is really a single good protection against RST attacks on BGP. You can filter ingress, but there always is a risk to miss something. Having MD allow to have month-long tcp session without risks of malicious rst.<br> </div> Sun, 27 Feb 2022 23:43:28 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886306/ https://lwn.net/Articles/886306/ shemminger <div class="FormattedComment"> In order to see packets dropping because CPU can&#x27;t keep up you have to look at the hardware statistics.<br> This is reported in rx_missed. Not sure if there more that HW can tell you.<br> There are lots of rx_dropped places in drivers, these could/should be instrumented.<br> </div> Sun, 27 Feb 2022 21:26:03 +0000 return -Exxxxx; https://lwn.net/Articles/886274/ https://lwn.net/Articles/886274/ jengelh <div class="FormattedComment"> Good thing the main kernel has just two `case EINVAL` across its ~30 million lines.<br> </div> Sun, 27 Feb 2022 09:17:04 +0000 return -Exxxxx; https://lwn.net/Articles/886264/ https://lwn.net/Articles/886264/ roc <div class="FormattedComment"> That would surely fail to build with EINVAL being used in a case label.<br> </div> Sun, 27 Feb 2022 03:21:29 +0000 return -Exxxxx; https://lwn.net/Articles/886242/ https://lwn.net/Articles/886242/ johill In most files you can even just <pre> #define EINVAL ({printk(...); 22;}) </pre> if you really want :-) Sat, 26 Feb 2022 19:05:13 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886241/ https://lwn.net/Articles/886241/ johill <div class="FormattedComment"> Check out commit 2d4bc93368f5a (&quot;netlink: extended ACK reporting&quot;) which added the bare minimum infrastructure a long time ago, and you can find many users of NL_SET_ERR_MSG/GENL_SET_ERR_MSG (and similar macros) these days.<br> <p> It supports reporting a string (error message), a pointer to a bad attribute, and if NL_SET_ERR_MSG_ATTR_POL was used (which it is in the general policy-based parsing) will even return the policy for the attribute back to userspace to explain why the attribute failed (e.g. if it&#x27;s NLA_RANGE(U32, 1,2) and you gave a value 3).<br> </div> Sat, 26 Feb 2022 19:03:21 +0000 return -Exxxxx; https://lwn.net/Articles/886231/ https://lwn.net/Articles/886231/ jreiser There is a need for a facility to locate at run time <b>every</b> failed subroutine call. The source code be edited with <tt>sed</tt> so that <tt>return -Exxxxx;</tt> becomes <tt>return ErrorCode(Exxxxx);</tt> with a default macro definiton something like <pre> #ifndef ErrorCode #define ErrorCode(errnum) -(errnum) #endif </pre> Then the determined investigator can re-compile selected source files with something like <pre> #define ErrorCode(errnum) myErrorDiagnostic(errnum, __builtin_return_address(0), __FUNCTION__, __LINE__) </pre> and supply a definition for the added subroutine <tt>myErrorDiagnostic</tt>. Of course there are a handful of cases where error numbers are variables or the syntax is complex, and also a few places where simple automated editing fails. Rate limiting the reporting can be a problem. But I did this once, and got the answer I wanted. Sat, 26 Feb 2022 15:20:14 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886213/ https://lwn.net/Articles/886213/ tititou <div class="FormattedComment"> Hi,<br> Can you provide a link or an example about it ?<br> </div> Sat, 26 Feb 2022 05:52:11 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886210/ https://lwn.net/Articles/886210/ alison <div class="FormattedComment"> Assuredly knowing when packets are dropped because NAPI polling isn&#x27;t keeping up with what&#x27;s incoming would be valuable. Yeah, I&#x27;m sure that patches and test data would be welcome.<br> </div> Sat, 26 Feb 2022 04:49:13 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886204/ https://lwn.net/Articles/886204/ shemminger <div class="FormattedComment"> Netlink was enhanced to provide error messages (not just errno).<br> Many places have it, but lots still need work -- volunteers wanted.<br> </div> Sat, 26 Feb 2022 02:04:21 +0000 Better visibility into packet-dropping decisions https://lwn.net/Articles/886165/ https://lwn.net/Articles/886165/ atnot <div class="FormattedComment"> Has this been considered for other things too? I regularly find myself wishing something like this existed for figuring out which of the many mechanism an EPERM/EACCES was caused by (unix permissions, acl, selinux and other LSMs, file systems, dm layers, cgroups, namespaces, seccomp, capabilities, API misuse, ...)<br> </div> Fri, 25 Feb 2022 20:29:24 +0000