summaryrefslogtreecommitdiffstats
path: root/examples/nfct-mnl-set-label.c
Commit message (Collapse)AuthorAgeFilesLines
* examples: check return value of nfct_nlmsg_build()Eyal Birger2021-01-031-1/+6
| | | | | | | | | | | | | | | | nfct_nlmsg_build() may fail for different reasons, for example if insufficient parameters exist in the ct object. The resulting nlh would not contain any of the ct attributes. Some conntrack operations would still operate in such case, for example an IPCTNL_MSG_CT_DELETE message would just delete all existing conntrack entries. While the example as it is does supply correct parameters, it's safer as reference to validate the return value. Signed-off-by: Eyal Birger <eyal.birger@gmail.com> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
* api: add CTA_LABEL_MASK attribute handlingFlorian Westphal2013-05-061-0/+8
| | | | | | | 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 <fw@strlen.de>
* examples: add connlabel dump/set/clear demo programsFlorian Westphal2013-05-061-0/+182
Signed-off-by: Florian Westphal <fw@strlen.de>