diff options
author | Phil Sutter <phil@nwl.cc> | 2019-04-25 14:56:54 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2019-05-03 20:02:45 +0200 |
commit | 10da57e36147bf5c73cd2820e11ec124ecfffc83 (patch) | |
tree | bc92463a0dcdd81a0b82acd8914b43abcc67ab7d /src/mnl.c | |
parent | 92591aa0da84821238107f2f1515a57cbbd2cf6a (diff) |
src: use UDATA defines from libnftnl
Userdata attribute names have been added to libnftnl, use them instead
of the local copy.
While being at it, rename udata_get_comment() in netlink_delinearize.c
and the callback it uses since the function is specific to rules. Also
integrate the existence check for NFTNL_RULE_USERDATA into it along with
the call to nftnl_rule_get_data().
Signed-off-by: Phil Sutter <phil@nwl.cc>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/mnl.c')
-rw-r--r-- | src/mnl.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -780,17 +780,17 @@ int mnl_nft_set_add(struct netlink_ctx *ctx, const struct cmd *cmd, udbuf = nftnl_udata_buf_alloc(NFT_USERDATA_MAXLEN); if (!udbuf) memory_allocation_error(); - if (!nftnl_udata_put_u32(udbuf, UDATA_SET_KEYBYTEORDER, + if (!nftnl_udata_put_u32(udbuf, NFTNL_UDATA_SET_KEYBYTEORDER, set->key->byteorder)) memory_allocation_error(); if (set->flags & NFT_SET_MAP && - !nftnl_udata_put_u32(udbuf, UDATA_SET_DATABYTEORDER, + !nftnl_udata_put_u32(udbuf, NFTNL_UDATA_SET_DATABYTEORDER, set->datatype->byteorder)) memory_allocation_error(); if (set->automerge && - !nftnl_udata_put_u32(udbuf, UDATA_SET_MERGE_ELEMENTS, + !nftnl_udata_put_u32(udbuf, NFTNL_UDATA_SET_MERGE_ELEMENTS, set->automerge)) memory_allocation_error(); |