On 10/19/22 01:44, Pablo Neira Ayuso wrote:
On Tue, Oct 18, 2022 at 11:45:28AM -0500, Ian Pilcher wrote:
The res_id member of struct nfgenmsg is supposed to be in network
byte order (big endian). Call htons() in __nftnl_nlmsg_build_hdr()
to ensure that this is true on little endian systems.
LGTM, this is zero all the time at this moment. But it might be useful
in the future to bump it.
Actually it isn't always zero. I only noticed this because
nftnl_batch_begin() and nftnl_batch_end() set res_id to
NFNL_SUBSYS_NFTABLES (instead of putting it in the high 8 bits of
nlmsg_type).
It's entirely possible that this is also a bug, as the fact that the
value isn't currently being byte-swapped doesn't seem to make any
difference.
--
========================================================================
Google Where SkyNet meets Idiocracy
========================================================================