diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-27 10:16:48 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2022-06-27 11:59:51 +0200 |
commit | 15b3be2e721067e25898a366f009e1a83f908967 (patch) | |
tree | ae7506ee0668037b191ea907a321c758c877eef6 /include | |
parent | f56e901acea6bb5febb24766e0e167989f5242c9 (diff) |
src: remove NFT_NLATTR_LOC_MAX limit for netlink location error reporting
Set might have more than 16 elements, use a runtime array to store
netlink error location.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/rule.h | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/include/rule.h b/include/rule.h index 90812255..ad9f9127 100644 --- a/include/rule.h +++ b/include/rule.h @@ -681,6 +681,11 @@ void monitor_free(struct monitor *m); #define NFT_NLATTR_LOC_MAX 32 +struct nlerr_loc { + uint16_t offset; + const struct location *location; +}; + /** * struct cmd - command statement * @@ -717,11 +722,9 @@ struct cmd { struct markup *markup; struct obj *object; }; - struct { - uint16_t offset; - const struct location *location; - } attr[NFT_NLATTR_LOC_MAX]; - int num_attrs; + struct nlerr_loc *attr; + uint32_t attr_array_len; + uint32_t num_attrs; const void *arg; }; |