summaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
Diffstat (limited to 'examples')
-rw-r--r--examples/nfct-mnl-set-label.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/examples/nfct-mnl-set-label.c b/examples/nfct-mnl-set-label.c
index 9e7fbf6..c52b267 100644
--- a/examples/nfct-mnl-set-label.c
+++ b/examples/nfct-mnl-set-label.c
@@ -35,6 +35,14 @@ static void set_label(struct nf_conntrack *ct, struct callback_args *cbargs)
nfct_bitmask_set_bit(b, bit);
nfct_set_attr(ct, ATTR_CONNLABELS, b);
+ if (bit >= 0) {
+ b = nfct_bitmask_new(bit);
+ if (b) {
+ nfct_bitmask_set_bit(b, bit);
+ nfct_set_attr(ct, ATTR_CONNLABELS_MASK, b);
+ }
+ }
+
cbargs->seq++;
nlh = mnl_nlmsg_put_header(buf);