summaryrefslogtreecommitdiffstats
path: root/src/expr/osf.c
diff options
context:
space:
mode:
authorPablo Neira Ayuso <pablo@netfilter.org>2024-06-23 13:27:00 +0200
committerPablo Neira Ayuso <pablo@netfilter.org>2024-06-23 13:28:53 +0200
commitd84846df1329c774a0a9e777d6c5adeb157b7499 (patch)
treede9aaa7eed55d0bd30d6c69dbde17bd7378bc2c9 /src/expr/osf.c
parentbe0bae0ad31b0adb506f96de083f52a2bd0d4fbf (diff)
expr: use NFTA_* netlink attributes to build fields, not NFTNL_EXPR_*
Coincidentally NFTNL_EXPR_BASE starts at 1 which comes right after NFTA_*_UNSPEC which is zero. And NFTNL_EXPR_ attribute values were mapping to NFTA_* attributes. Use NFTA_* for netlink attribute types instead. Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/expr/osf.c')
-rw-r--r--src/expr/osf.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/expr/osf.c b/src/expr/osf.c
index 060394b..293a814 100644
--- a/src/expr/osf.c
+++ b/src/expr/osf.c
@@ -89,12 +89,12 @@ nftnl_expr_osf_build(struct nlmsghdr *nlh, const struct nftnl_expr *e)
struct nftnl_expr_osf *osf = nftnl_expr_data(e);
if (e->flags & (1 << NFTNL_EXPR_OSF_DREG))
- mnl_attr_put_u32(nlh, NFTNL_EXPR_OSF_DREG, htonl(osf->dreg));
+ mnl_attr_put_u32(nlh, NFTA_OSF_DREG, htonl(osf->dreg));
if (e->flags & (1 << NFTNL_EXPR_OSF_TTL))
- mnl_attr_put_u8(nlh, NFTNL_EXPR_OSF_TTL, osf->ttl);
+ mnl_attr_put_u8(nlh, NFTA_OSF_TTL, osf->ttl);
if (e->flags & (1 << NFTNL_EXPR_OSF_FLAGS))
if (osf->flags)
- mnl_attr_put_u32(nlh, NFTNL_EXPR_OSF_FLAGS, htonl(osf->flags));
+ mnl_attr_put_u32(nlh, NFTA_OSF_FLAGS, htonl(osf->flags));
}
static int