netfilter-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] netlink: use set location for IO errors
@ 2014-03-07 10:12 Patrick McHardy
  2014-03-07 10:12 ` [PATCH 2/2] parser: add grammatical distinction for verdict maps Patrick McHardy
  0 siblings, 1 reply; 2+ messages in thread
From: Patrick McHardy @ 2014-03-07 10:12 UTC (permalink / raw)
  To: pablo; +Cc: netfilter-devel

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 | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/netlink.c b/src/netlink.c
index b2bd3c5..daac64c 100644
--- a/src/netlink.c
+++ b/src/netlink.c
@@ -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 =
-- 
1.8.5.3


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2014-03-07 10:12 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-03-07 10:12 [PATCH 1/2] netlink: use set location for IO errors Patrick McHardy
2014-03-07 10:12 ` [PATCH 2/2] parser: add grammatical distinction for verdict maps Patrick McHardy

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).