table inet filter {
        set spamhaus {
                type ipv4_addr
                flags interval
                elements = { 1.2.3.8/31 comment "evil people", 
3.3.3.16-3.3.3.20 comment "more than evil" }
        }
 }

Signed-off-by: Pablo Neira Ayuso <[email protected]>
---
 src/segtree.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/segtree.c b/src/segtree.c
index e1339daf1341..7a443632ece5 100644
--- a/src/segtree.c
+++ b/src/segtree.c
@@ -829,6 +829,9 @@ void interval_map_decompose(struct expr *set)
 
                        tmp = range_expr_alloc(&low->location, expr_value(low), 
tmp);
                        tmp = set_elem_expr_alloc(&low->location, tmp);
+                       if (low->comment)
+                               tmp->comment = xstrdup(low->comment);
+
                        if (low->ops->type == EXPR_MAPPING)
                                tmp = mapping_expr_alloc(&tmp->location, tmp, 
low->right);
 
@@ -843,6 +846,9 @@ void interval_map_decompose(struct expr *set)
                        prefix->len = expr_value(i)->len;
 
                        prefix = set_elem_expr_alloc(&low->location, prefix);
+                       if (low->comment)
+                               prefix->comment = xstrdup(low->comment);
+
                        if (low->ops->type == EXPR_MAPPING)
                                prefix = mapping_expr_alloc(&low->location, 
prefix,
                                                            low->right);
-- 
2.11.0

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to