From cbeb5df0a202f07e84db32d4015026b3d3f3c892 Mon Sep 17 00:00:00 2001 From: Patrick McHardy Date: Thu, 6 Mar 2014 16:26:09 +0100 Subject: set: abort on interval conflicts We currently print a debug message (with debugging) and continue. Output a proper error message and abort. While at it, make sure we only report a conflict if there actually is one. This is not the case similar actions, IOW in case of sets, never, in case of maps, only if the mapping differs. Signed-off-by: Patrick McHardy --- src/rule.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/rule.c') diff --git a/src/rule.c b/src/rule.c index 0e04282e..b7190401 100644 --- a/src/rule.c +++ b/src/rule.c @@ -498,8 +498,9 @@ static int do_add_set(struct netlink_ctx *ctx, const struct handle *h, if (netlink_add_set(ctx, h, set) < 0) return -1; if (set->init != NULL) { - if (set->flags & SET_F_INTERVAL) - set_to_intervals(set); + if (set->flags & SET_F_INTERVAL && + set_to_intervals(ctx->msgs, set) < 0) + return -1; if (do_add_setelems(ctx, &set->handle, set->init) < 0) return -1; } -- cgit v1.2.3