Better visibility into packet-dropping decisions
Better visibility into packet-dropping decisions
Posted Feb 26, 2022 19:03 UTC (Sat) by johill (subscriber, #25196)In reply to: Better visibility into packet-dropping decisions by tititou
Parent article: Better visibility into packet-dropping decisions
Check out commit 2d4bc93368f5a ("netlink: extended ACK reporting") 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.
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's NLA_RANGE(U32, 1,2) and you gave a value 3).