Skip to contentSkip to conversation

ct: add missing slash to connlabel path

PATCH In review Pablo Neira Ayuso 2 participants 4 messages Aug 17, 2016 netfilter

lore
Share & tools
lore

Pablo Neira Ayuso

author maintainer
#0 lore raw

PATCH 1/2 ct: add missing slash to connlabel path

If I configure nftables via:

	./configure --prefix=/usr

the connlabel path breaks due to missing slash, so append this after DEFAULT_INCLUDE_PATH.

---
 src/ct.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
src/ct.c +1 -1
index f383f29..f6b1dc1 100644
@@ -29,7 +29,7 @@
 #include <utils.h>
 #include <statement.h>
 
-#define CONNLABEL_CONF	DEFAULT_INCLUDE_PATH "connlabel.conf"
+#define CONNLABEL_CONF	DEFAULT_INCLUDE_PATH "/connlabel.conf"
 
 static const struct symbol_table ct_state_tbl = {
 	.symbols	= {
Signature · 1 line
2.1.4
author maintainer
#1 lore raw

PATCH 2/2 ct: release ct_label table on exit

Just like we do with other symbol tables.

---
 src/ct.c | 5 +++++
 1 file changed, 5 insertions(+)
src/ct.c +5 -0
index f6b1dc1..f6018d8 100644
@@ -164,6 +164,11 @@ static void __init ct_label_table_init(void)
 	ct_label_tbl = rt_symbol_table_init(CONNLABEL_CONF);
 }
 
+static void __exit ct_label_table_exit(void)
+{
+	rt_symbol_table_free(ct_label_tbl);
+}
+
 #ifndef NF_CT_HELPER_NAME_LEN
 #define NF_CT_HELPER_NAME_LEN	16
 #endif
Signature · 1 line
2.1.4