diff mbox series

[nft,3/4] rule: netlink attribute offset is uint32_t for struct nlerr_loc

Message ID 20241023222727.251229-3-pablo@netfilter.org
State Changes Requested
Headers show
Series [nft,1/4] mnl: rename to mnl_seqnum_alloc() to mnl_seqnum_inc() | expand

Commit Message

Pablo Neira Ayuso Oct. 23, 2024, 10:27 p.m. UTC
The maximum netlink message length (nlh->nlmsg_len) is uint32_t, struct
nlerr_loc stores the offset to the netlink attribute which must be
uint32_t, not uint16_t.

Fixes: f8aec603aa7e ("src: initial extended netlink error reporting")
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
---
 include/rule.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/include/rule.h b/include/rule.h
index a1628d82d275..3fcfa445d103 100644
--- a/include/rule.h
+++ b/include/rule.h
@@ -695,7 +695,7 @@  void monitor_free(struct monitor *m);
 #define NFT_NLATTR_LOC_MAX 32
 
 struct nlerr_loc {
-	uint16_t		offset;
+	uint32_t		offset;
 	const struct location	*location;
 };