Cannot get IPv4 address using SSL with IPv6 support on host
jpschewe opened this issue · 3 comments
I've recently added IPv6 support to my home network. When I did that ddclient started failing with malformed IPv4 address (MY_IPv6_ADDRESS)
. I'm using the configuration below. Looking at the source I see that when the URL is "https" the "IO::Socket::SSL" library is used. According to it's documentation it will transparently use IPv6 or IPv4. This is a problem for ddclient when one wants an IPv4 address. I believe you'll need to explicitly create an IPv4 or IPv6 socket and then pass that to the SSL constructor to ensure that the correct address type is retrieved. Do you have another solution that doesn't involve patching the code?
syslog=yes
mail=root
mail-failure=root
# where to get IP from
use=web
web=https://domains.google.com/checkip
ipv6=no
ssl=yes
server=api.dynu.com
protocol=dyndns2
login=USERNAME
password=PASSWORD
HOSTNAME
What version of ddclient are you using? Sounds like it's probably an old version. Please try a recent version of master
, or at least v3.11.2.
I'm using 3.9.1 shipped with Ubuntu 22.04.
I found that inadyn is also shipped with Ubuntu 22.04 and doesn't have this problem, so I'm using that for now.
You can find recent versions of ddclient for Ubuntu at:
https://launchpad.net/~ddclient/+archive/ubuntu/ppa (stable releases)
https://launchpad.net/~ddclient/+archive/ubuntu/daily (daily builds of master
)