diff mbox series

[libnftnl,04/17] obj: Validate NFTNL_OBJ_TYPE, too

Message ID 20240319171224.18064-5-phil@nwl.cc
State Accepted
Headers show
Series obj: Introduce attribute policies | expand

Commit Message

Phil Sutter March 19, 2024, 5:12 p.m. UTC
Fixes: 5573d0146c1ae ("src: support for stateful objects")
Signed-off-by: Phil Sutter <phil@nwl.cc>
---
 src/object.c | 1 +
 1 file changed, 1 insertion(+)
diff mbox series

Patch

diff --git a/src/object.c b/src/object.c
index 0814be744448b..d3bfd16df532e 100644
--- a/src/object.c
+++ b/src/object.c
@@ -98,6 +98,7 @@  void nftnl_obj_unset(struct nftnl_obj *obj, uint16_t attr)
 }
 
 static uint32_t nftnl_obj_validate[NFTNL_OBJ_MAX + 1] = {
+	[NFTNL_OBJ_TYPE]	= sizeof(uint32_t),
 	[NFTNL_OBJ_FAMILY]	= sizeof(uint32_t),
 	[NFTNL_OBJ_USE]		= sizeof(uint32_t),
 	[NFTNL_OBJ_HANDLE]	= sizeof(uint64_t),