Catch -1 case, so we have a chance to handle EINTR.
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
list_splice_tail_init(&ctx->list, &table->chains);
if (cmd != CMD_RESET) {
- /* Don't check for errors on listings, this would break
- * nft with old kernels with no stateful object support.
- */
- netlink_list_objs(ctx, &table->handle, &internal_location);
+ ret = netlink_list_objs(ctx, &table->handle, &internal_location);
+ if (ret < 0)
+ return -1;
list_splice_tail_init(&ctx->list, &table->objs);
}