diff mbox

[iptables,3/3] android: build: Blacklist TCPOPTSTRIP on systems that lack TCPOPT_*

Message ID 1382813433-20890-4-git-send-email-cernekee@gmail.com
State Not Applicable
Delegated to: Jozsef Kadlecsik
Headers show

Commit Message

Kevin Cernekee Oct. 26, 2013, 6:50 p.m. UTC
Bionic's <netinet/tcp.h> is missing constants needed to build this module,
so have autoconf check for this condition before trying to build it.

Signed-off-by: Kevin Cernekee <cernekee@gmail.com>
---
 configure.ac |    8 ++++++++
 1 file changed, 8 insertions(+)

Comments

Pablo Neira Ayuso Nov. 3, 2013, 9:48 p.m. UTC | #1
On Sat, Oct 26, 2013 at 11:50:33AM -0700, Kevin Cernekee wrote:
> Bionic's <netinet/tcp.h> is missing constants needed to build this module,
> so have autoconf check for this condition before trying to build it.

The blacklist infrastructure is there to skip extensions whose
dependencies are missing, ie. a library. I don't want to use it for
this hack. Please, fix bionic.
--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/configure.ac b/configure.ac
index 76d0b37..53a9ded 100644
--- a/configure.ac
+++ b/configure.ac
@@ -91,6 +91,14 @@  if test "$nfconntrack" -ne 1; then
 	echo "WARNING: libnetfilter_conntrack not found, connlabel match will not be built";
 fi;
 
+AC_CHECK_DECL([TCPOPT_WINDOW], [tcpopt_ok=1], [tcpopt_ok=0],
+	[[#include <netinet/tcp.h>]])
+
+if test "$tcpopt_ok" -ne 1; then
+	blacklist_modules="$blacklist_modules TCPOPTSTRIP";
+	echo "WARNING: TCPOPT_* constants not found, TCPOPTSTRIP target will not be built";
+fi;
+
 AC_SUBST([blacklist_modules])
 AC_CHECK_SIZEOF([struct ip6_hdr], [], [#include <netinet/ip6.h>])