From c382af56a5adb8c75d45e35f5d32d0fe5fc14da8 Mon Sep 17 00:00:00 2001 From: Joel Beckmeyer Date: Wed, 8 Nov 2023 13:38:15 -0500 Subject: [PATCH] don't print erroneous IP version --- ddclient.in | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/ddclient.in b/ddclient.in index c509aba..f8291f2 100755 --- a/ddclient.in +++ b/ddclient.in @@ -2603,7 +2603,9 @@ sub geturl { debug("server = %s", $server); (my $_url = $url) =~ s%\?.*%?%; #redact possible credentials debug("url = %s", $_url); - debug("ip ver = %s", $ipversion); + if ($ipversion != 0) { + debug("ip ver = %s", $ipversion); + } if (!opt('exec')) { debug("skipped network connection"); @@ -2641,7 +2643,11 @@ sub geturl { verbose("RECEIVE:", "%s", $reply // ""); if (!$reply) { # don't include ${url} as that might expose login credentials - warning("curl cannot connect to %s://%s using IPv%s",${protocol},${server},$ipversion); + if ($ipversion != 0) { + warning("curl cannot connect to %s://%s using IPv%s",${protocol},${server},$ipversion); + } else { + warning("curl cannot connect to %s://%s",${protocol},${server}); + } } }