diff mbox series

conntrackd UDP IPv6 destination address not usable (Bug 1378)

Message ID 20191107081710.GC5020@laptop-jmr.hs-koblenz.de
State Accepted
Delegated to: Pablo Neira
Headers show
Series conntrackd UDP IPv6 destination address not usable (Bug 1378) | expand

Commit Message

Jan-Martin Raemer Nov. 7, 2019, 8:17 a.m. UTC
Hi,

as reported in https://bugzilla.netfilter.org/show_bug.cgi?id=1378,
conntrackd refuses to start with a vaild IPv6_Destination_Address,
reporting "inet_pton(): IPv6 unsupported" due to a forgotten handling of
err>0 (i.e. success). This patch fixes the issue:

Signed-off-by: Jan-Martin Raemer <raemer@zit-rlp.de>

Best regards,
Jan-Martin

Comments

Pablo Neira Ayuso Nov. 7, 2019, 9:37 a.m. UTC | #1
On Thu, Nov 07, 2019 at 09:17:10AM +0100, Jan-Martin Raemer wrote:
> Hi,
> 
> as reported in https://bugzilla.netfilter.org/show_bug.cgi?id=1378,
> conntrackd refuses to start with a vaild IPv6_Destination_Address,
> reporting "inet_pton(): IPv6 unsupported" due to a forgotten handling of
> err>0 (i.e. success). This patch fixes the issue:

Applied, thanks.
diff mbox series

Patch

diff --git a/src/read_config_yy.y b/src/read_config_yy.y
index a4aa7f5..31109c4 100644
--- a/src/read_config_yy.y
+++ b/src/read_config_yy.y
@@ -467,7 +467,7 @@  udp_option : T_IPV6_DEST_ADDR T_IP
                dlog(LOG_WARNING, "%s is not a valid IPv6 address", $2);
                free($2);
                break;
-       } else {
+       } else if (err < 0) {
                dlog(LOG_ERR, "inet_pton(): IPv6 unsupported!");
                exit(EXIT_FAILURE);
        }