summaryrefslogtreecommitdiffstats
path: root/include/net/netfilter/nf_conntrack_labels.h
diff options
context:
space:
mode:
authorJoe Stringer2015-08-26 20:31:51 +0200
committerDavid S. Miller2015-08-27 20:40:43 +0200
commit86ca02e77408bb58ba596c1a411ec7f631733690 (patch)
tree47c49fb6c16f6ea00844e48f9c7a8c9739d88334 /include/net/netfilter/nf_conntrack_labels.h
parentnetfilter: Always export nf_connlabels_replace() (diff)
downloadkernel-qcow2-linux-86ca02e77408bb58ba596c1a411ec7f631733690.tar.gz
kernel-qcow2-linux-86ca02e77408bb58ba596c1a411ec7f631733690.tar.xz
kernel-qcow2-linux-86ca02e77408bb58ba596c1a411ec7f631733690.zip
netfilter: connlabels: Export setting connlabel length
Add functions to change connlabel length into nf_conntrack_labels.c so they may be reused by other modules like OVS and nftables without needing to jump through xt_match_check() hoops. Suggested-by: Florian Westphal <fw@strlen.de> Signed-off-by: Joe Stringer <joestringer@nicira.com> Acked-by: Florian Westphal <fw@strlen.de> Acked-by: Thomas Graf <tgraf@suug.ch> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/netfilter/nf_conntrack_labels.h')
-rw-r--r--include/net/netfilter/nf_conntrack_labels.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/net/netfilter/nf_conntrack_labels.h b/include/net/netfilter/nf_conntrack_labels.h
index dec6336bf850..7e2b1d025f50 100644
--- a/include/net/netfilter/nf_conntrack_labels.h
+++ b/include/net/netfilter/nf_conntrack_labels.h
@@ -54,7 +54,11 @@ int nf_connlabels_replace(struct nf_conn *ct,
#ifdef CONFIG_NF_CONNTRACK_LABELS
int nf_conntrack_labels_init(void);
void nf_conntrack_labels_fini(void);
+int nf_connlabels_get(struct net *net, unsigned int n_bits);
+void nf_connlabels_put(struct net *net);
#else
static inline int nf_conntrack_labels_init(void) { return 0; }
static inline void nf_conntrack_labels_fini(void) {}
+static inline int nf_connlabels_get(struct net *net, unsigned int n_bits) { return 0; }
+static inline void nf_connlabels_put(struct net *net) {}
#endif