Skip to contentSkip to conversation

configure: Fix logic to show connlabel support

PATCH In review Shivani Bhardwaj 2 participants 3 messages Jun 22, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix logic to show connlabel support

With the earlier logic, when libnfnetlink and libnetfilter_conntrack were not installed, all the warnings showed up correctly but the final configuration showed:

connlabel support: yes

which was faulty.
This was happening because connlabel module was blacklisted first and then set to "no" if package requirements were not met. After this patch, iptables configuration shows up correctly.

Fixes commit 3b7a227 (configure: Show support for connlabel)

Tested before and after installing the dependencies.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index c91e9e7..131bc8b 100644
@@ -173,9 +173,9 @@ if test "x$enable_connlabel" = "xyes"; then
 		[nfconntrack=1], [nfconntrack=0])
 
 	if test "$nfconntrack" -ne 1; then
+		enable_connlabel="no";
 		blacklist_modules="$blacklist_modules connlabel";
 		echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
-		enable_connlabel = "no";
 	fi;
 else
 	blacklist_modules="$blacklist_modules connlabel";
Signature · 1 line
2.7.4
maintainer
#1 lore raw
Quoted 9 lines · Shivani Bhardwaj

With the earlier logic, when libnfnetlink and libnetfilter_conntrack were not installed, all the warnings showed up correctly but the final configuration showed:

connlabel support: yes

which was faulty.
This was happening because connlabel module was blacklisted first and then set to "no" if package requirements were not met.

its because ...

configure.ac if test "x$enable_connlabel" = "xyes"; then · line 178

Quoted 12 lines
configure.ac +1 -1
index c91e9e7..131bc8b 100644
@@ -173,9 +173,9 @@ if test "x$enable_connlabel" = "xyes"; then
 		[nfconntrack=1], [nfconntrack=0])
 
 	if test "$nfconntrack" -ne 1; then
+		enable_connlabel="no";
 		blacklist_modules="$blacklist_modules connlabel";
 		echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
-		enable_connlabel = "no";

... of the space around the '=', shell tried to execute 'enable_connlabel' command here.

#2 lore raw
Quoted 20 lines · Florian Westphal
Quoted 9 lines · Shivani Bhardwaj

With the earlier logic, when libnfnetlink and libnetfilter_conntrack were not installed, all the warnings showed up correctly but the final configuration showed:

connlabel support: yes

which was faulty.
This was happening because connlabel module was blacklisted first and then set to "no" if package requirements were not met.

its because ...

Quoted 7 lines
configure.ac +0 -0
index c91e9e7..131bc8b 100644
@@ -173,9 +173,9 @@ if test "x$enable_connlabel" = "xyes"; then
              [nfconntrack=1], [nfconntrack=0])
 
Quoted 8 lines

configure.ac if test "x$enable_connlabel" = "xyes"; then · line 178

Quoted 5 lines
configure.ac +1 -1
      if test "$nfconntrack" -ne 1; then
+             enable_connlabel="no";
              blacklist_modules="$blacklist_modules connlabel";
              echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
-             enable_connlabel = "no";

... of the space around the '=', shell tried to execute 'enable_connlabel' command here.

Thanks. I'm sorry for misinterpreting and writing the wrong message. I shall resend the patch.