Linux Netfilter development
 help / color / mirror / Atom feed
* [RFC PATCH 0/1] libnftnl: Incorrect res_id byte order?
@ 2022-10-18 16:45 Ian Pilcher
  2022-10-18 16:45 ` [RFC PATCH 1/1] libnftnl: Fix res_id byte order Ian Pilcher
  0 siblings, 1 reply; 6+ messages in thread
From: Ian Pilcher @ 2022-10-18 16:45 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

I am marking this as an RFC and including this cover letter, because
I'm not absolutely 100% sure that the current code is incorrect.  (It
obviously works, or this would have come up before.)

AFAICT, the res_id of struct nfgenmsg is supposed to be in network byte
order, and that isn't happening on little endian systems.
nftnl_batch_begin() and nftnl_batch_end() both pass NFNL_SUBSYS_NFTABLES
(10) to __nftnl_nlmsg_build_hdr(), but without a call to htons(), the
message contains 2560 (when interpretted in network byte order).

Ian Pilcher (1):
  libnftnl: Fix res_id byte order

 src/common.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


base-commit: 461f36979f4ed2b6cc95f06cf5f9c3c84bdf9e70
-- 
2.37.3


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2022-10-25 10:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-18 16:45 [RFC PATCH 0/1] libnftnl: Incorrect res_id byte order? Ian Pilcher
2022-10-18 16:45 ` [RFC PATCH 1/1] libnftnl: Fix res_id byte order Ian Pilcher
2022-10-19  6:44   ` Pablo Neira Ayuso
2022-10-20 15:05     ` Ian Pilcher
2022-10-21  9:28       ` Pablo Neira Ayuso
2022-10-25 10:37   ` Pablo Neira Ayuso

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox