Skip to contentSkip to conversation

configure: Fix flex version check

PATCH In review Shivani Bhardwaj 2 participants 4 messages Jun 17, 2016 – Jun 20, 2016 netfilter

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 configure: Fix flex version check

Following the fixes for version check in iptables and nftables, make conntrack-tools avoid generating false warning for Flex version greater than 2.5.x.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +1 -1
index c541034..3bc5155 100644
@@ -46,7 +46,7 @@ flex_major=`echo $flex_version| cut -d . -f 1`
 flex_minor=`echo $flex_version| cut -d . -f 2`
 flex_rev=`echo $flex_version| cut -d . -f 3`
  
-if test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33"; then
+if (test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33") || (test "$flex_major" -eq "2" && test "$flex_minor" -gt "5") || test "$flex_major" -gt "2"; then
 	AC_MSG_RESULT([$flex_version. OK])
 else
 	AC_MSG_WARN([flex version $flex_version found.
Signature · 1 line
2.7.4
#1 lore raw

Hi Shivani,

Thanks for following up on this, see comment below.

Quoted 14 lines · Shivani Bhardwaj

Following the fixes for version check in iptables and nftables, make conntrack-tools avoid generating false warning for Flex version greater than 2.5.x.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +0 -0
index c541034..3bc5155 100644

configure.ac flex_major=`echo $flex_version| cut -d . -f 1` · line 52

Quoted 8 lines
configure.ac +1 -1
@@ -46,7 +46,7 @@ flex_major=`echo $flex_version| cut -d . -f 1`
 flex_minor=`echo $flex_version| cut -d . -f 2`
 flex_rev=`echo $flex_version| cut -d . -f 3`
 
-if test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33"; then
+if (test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33") || (test "$flex_major" -eq "2" && test "$flex_minor" -gt "5") || test "$flex_major" -gt "2"; then
 	AC_MSG_RESULT([$flex_version. OK])
 else
 	AC_MSG_WARN([flex version $flex_version found.

I'm starting to think that it's better to get rid of this version check. This was introduced in 2008:

        ed50c34 ("add flex version warning (better with >= 2.5.33)")

I can see RPM packages for 2.5.53 since 2008.

The development of conntrack-tools a bit before that time, so I think it's better to nuke these checks, better since we have less code to maintain :)

Thanks.

#2 lore raw
Quoted 31 lines · Pablo Neira Ayuso

Hi Shivani,

Thanks for following up on this, see comment below.

Quoted 14 lines · Shivani Bhardwaj

Following the fixes for version check in iptables and nftables, make conntrack-tools avoid generating false warning for Flex version greater than 2.5.x.

---
 configure.ac | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configure.ac +0 -0
index c541034..3bc5155 100644

configure.ac flex_major=`echo $flex_version| cut -d . -f 1` · line 52

Quoted 8 lines
configure.ac +1 -1
@@ -46,7 +46,7 @@ flex_major=`echo $flex_version| cut -d . -f 1`
 flex_minor=`echo $flex_version| cut -d . -f 2`
 flex_rev=`echo $flex_version| cut -d . -f 3`
 
-if test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33"; then
+if (test "$flex_major" -eq "2" && test "$flex_minor" -eq "5" && test "$flex_rev" -ge "33") || (test "$flex_major" -eq "2" && test "$flex_minor" -gt "5") || test "$flex_major" -gt "2"; then
      AC_MSG_RESULT([$flex_version. OK])
 else
      AC_MSG_WARN([flex version $flex_version found.

I'm starting to think that it's better to get rid of this version check. This was introduced in 2008:

Quoted 8 lines
        ed50c34 ("add flex version warning (better with >= 2.5.33)")

I can see RPM packages for 2.5.53 since 2008.

The development of conntrack-tools a bit before that time, so I think it's better to nuke these checks, better since we have less code to maintain :)

Hi Pablo,

Just to avoid any confusion, should I be following up with patches for iptables and conntrack-tools to completely remove this check? It is already not there in nft. Please let me know.

Thank you.

Quoted 1 line

Thanks.

#3 lore raw
Quoted 5 lines · Shivani Bhardwaj

Hi Pablo,

Just to avoid any confusion, should I be following up with patches for iptables and conntrack-tools to completely remove this check? It is already not there in nft. Please let me know.

Yes, please remove this check. So just check for 'flex' with no specific version as in nft. Thanks!