]> git.ipfire.org Git - thirdparty/nftables.git/commitdiff
netlink: use set location for IO errors
authorPatrick McHardy <kaber@trash.net>
Fri, 7 Mar 2014 09:57:08 +0000 (10:57 +0100)
committerPatrick McHardy <kaber@trash.net>
Fri, 7 Mar 2014 09:57:08 +0000 (10:57 +0100)
We currently crash when reporting a permission denied error for set additions.
This is due to using the wrong location, fix by passing in the set location.

Signed-off-by: Patrick McHardy <kaber@trash.net>
src/netlink.c

index b2bd3c5c0d5091b3c97cda50ea7df04aed93a7ca..daac64caa509b850394e0870789a4827c46ccc51 100644 (file)
@@ -777,7 +777,7 @@ int netlink_add_set(struct netlink_ctx *ctx, const struct handle *h,
 
        err = mnl_nft_set_add(nf_sock, nls, NLM_F_EXCL | NLM_F_ECHO);
        if (err < 0)
-               netlink_io_error(ctx, NULL, "Could not add set: %s",
+               netlink_io_error(ctx, &set->location, "Could not add set: %s",
                                 strerror(errno));
 
        set->handle.set =