summaryrefslogtreecommitdiffstats
path: root/src/rule.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/rule.c')
-rw-r--r--src/rule.c5
1 files changed, 3 insertions, 2 deletions
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;
}