diff options
author | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-04-24 11:53:54 +0200 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2018-04-24 11:58:44 +0200 |
commit | 70cb4bbd080e094f51b94eded8ef816e3739ec66 (patch) | |
tree | 10d10dd1e86a78d693299de905823843594f2328 /src/netlink.c | |
parent | a8ba88c3703a6e4853d2bd51a0b0190863af31b4 (diff) |
netlink: no EINTR handling from netlink_get_setelem()
This cannot happen, this call does not set the NLM_F_DUMP flag.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'src/netlink.c')
-rw-r--r-- | src/netlink.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/netlink.c b/src/netlink.c index 525100b6..75c371dc 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -1332,7 +1332,6 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, struct set *set, struct expr *init) { struct nftnl_set *nls, *nls_out = NULL; - int err = 0; nls = alloc_nftnl_set(h); alloc_setelem_cache(init, nls); @@ -1340,14 +1339,8 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, netlink_dump_set(nls, ctx); nls_out = mnl_nft_setelem_get_one(ctx, nls); - if (!nls_out) { - nftnl_set_free(nls); - if (errno == EINTR) - return -1; - - err = -1; - goto out; - } + if (!nls_out) + return -1; ctx->set = set; set->init = set_expr_alloc(loc, set); @@ -1362,8 +1355,8 @@ int netlink_get_setelem(struct netlink_ctx *ctx, const struct handle *h, if (set->flags & NFT_SET_INTERVAL) get_set_decompose(table, set); -out: - return err; + + return 0; } void netlink_dump_obj(struct nftnl_obj *nln, struct netlink_ctx *ctx) |