path: root/src/conntrack.c
diff options
authorNicolas Dichtel <>2017-05-30 09:56:26 +0200
committerPablo Neira Ayuso <>2017-06-06 17:37:43 +0200
commitef410bf00a5b1e36dada75127dd525cd377a4756 (patch)
tree7b0d10a23b063ccf1700932917bead6bd2e5b3c0 /src/conntrack.c
parent3d9849649ec617b45a57a50c93244c13ea8244e0 (diff)
conntrackd: remove use of HAVE_INET_PTON_IPV6
The goal of this patch is to fix the ipv6 support when conntrackd is cross-compiled. The AC_RUN_IFELSE macro must be avoided as much as possible. See section 6.6 of the gnu autoconf: "If you really need to test for a runtime behavior while configuring, you can write a test program to determine the result, and compile and run it using AC_RUN_IFELSE. Avoid running test programs if possible, because this prevents people from configuring your package for cross-compiling." Let's remove this check and test the returned error to handle the case where ipv6 is not supported (inet_pton() returns -1 when the family is not supported). Reported-by: Zhenlin Zhang <> Signed-off-by: Nicolas Dichtel <> Signed-off-by: Pablo Neira Ayuso <>
Diffstat (limited to 'src/conntrack.c')
1 files changed, 0 insertions, 2 deletions
diff --git a/src/conntrack.c b/src/conntrack.c
index 57dbed7..8d19cca 100644
--- a/src/conntrack.c
+++ b/src/conntrack.c
@@ -1057,10 +1057,8 @@ parse_inetaddr(const char *cp, struct addr_parse *parse)
if (inet_aton(cp, &parse->addr))
return AF_INET;
else if (inet_pton(AF_INET6, cp, &parse->addr6) > 0)
return AF_INET6;
return AF_UNSPEC;