From 22c8af6991eab12a87fec4f06559e1d7ea3826f1 Mon Sep 17 00:00:00 2001 From: Florian Westphal Date: Fri, 14 Dec 2012 12:42:48 +0100 Subject: api: add CTA_LABEL_MASK attribute handling allows to set/clear only a subset of the in-kernel label set, e.g. "set bit 1 and do not change any others". Signed-off-by: Florian Westphal --- src/conntrack/getter.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/conntrack/getter.c') diff --git a/src/conntrack/getter.c b/src/conntrack/getter.c index 53c9e0e..ae546ee 100644 --- a/src/conntrack/getter.c +++ b/src/conntrack/getter.c @@ -344,6 +344,11 @@ static const void *get_attr_connlabels(const struct nf_conntrack *ct) return ct->connlabels; } +static const void *get_attr_connlabels_mask(const struct nf_conntrack *ct) +{ + return ct->connlabels_mask; +} + const get_attr get_attr_array[ATTR_MAX] = { [ATTR_ORIG_IPV4_SRC] = get_attr_orig_ipv4_src, [ATTR_ORIG_IPV4_DST] = get_attr_orig_ipv4_dst, @@ -412,4 +417,5 @@ const get_attr get_attr_array[ATTR_MAX] = { [ATTR_TIMESTAMP_STOP] = get_attr_timestamp_stop, [ATTR_HELPER_INFO] = get_attr_helper_info, [ATTR_CONNLABELS] = get_attr_connlabels, + [ATTR_CONNLABELS_MASK] = get_attr_connlabels_mask, }; -- cgit v1.2.3