diff options
| author | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-10-23 23:07:31 +0200 |
|---|---|---|
| committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2024-10-28 23:20:38 +0100 |
| commit | f7c2b27c9f8356c634f0405347444e03e10e151b (patch) | |
| tree | 577ef4c61013b05f94e1100d66146c1ed1e7da19 /src/cmd.c | |
| parent | b4ce90d52d564efaced298f6e9c575d6942ecf91 (diff) | |
mnl: update cmd_add_loc() to take struct nlmsghdr
To prepare for a fix for very large sets.
No functional change is intended.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/cmd.c')
| -rw-r--r-- | src/cmd.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -17,14 +17,14 @@ #include <errno.h> #include <cache.h> -void cmd_add_loc(struct cmd *cmd, uint16_t offset, const struct location *loc) +void cmd_add_loc(struct cmd *cmd, const struct nlmsghdr *nlh, const struct location *loc) { if (cmd->num_attrs >= cmd->attr_array_len) { cmd->attr_array_len *= 2; cmd->attr = xrealloc(cmd->attr, sizeof(struct nlerr_loc) * cmd->attr_array_len); } - cmd->attr[cmd->num_attrs].offset = offset; + cmd->attr[cmd->num_attrs].offset = nlh->nlmsg_len; cmd->attr[cmd->num_attrs].location = loc; cmd->num_attrs++; } |
