Actions
Bug #474
closedddns-myip on ruby 1.9.1 fails to answer
Start date:
2015-08-24
Due date:
% Done:
100%
Estimated time:
Patch Available:
Found in Versions:
Confirmed:
No
Security:
Help Needed:
Description
Function is blocking when an ipv6 interace is up but another interface is tested.
ddns-myip eth6 CTRL-C /usr/lib/ruby/vendor_ruby/curl/easy.rb:58:in `perform': Interrupt from /usr/lib/ruby/vendor_ruby/curl/easy.rb:58:in `perform' from /usr/local/lib/site_ruby/1.9.1/ddns/myip.rb:46:in `find' from /usr/bin/ddns-myip:34:in `<main>'
DPKG info
ii libcurl3-gnutls:i386 7.36.0-1 i386 easy-to-use client-side URL transfer library
if my eth3 which has ipv4 and ipv6 links is down, and eth6 with only ipv4 link is up I can get
curl --interface eth6 https://myip.duckcorp.org/ --- ip: 85.171.xxx.yyy
non-blocking
if eth3 is up and eth6 is up
curl -v --interface eth6 https://myip.duckcorp.org/ * Hostname was NOT found in DNS cache * Trying 2001:67c:1740:aaaa::bbbb:cccc
blocking there.
after modifying the code as request to do printouts
client_config.profiles.to_h.each_pair do |hostname, profile| [:ipv4, :ipv6].each do |ipver| ip = profile[ipver.to_s] p hostname if ip ip = myip.find(ipver, profile.interface) if ip == 'auto' ip = '' if ip == 'none' regip.setns(ipver, hostname, ip) end end end
#<OpenStruct log=#<OpenStruct console_level="verbose", path="/var/log/ddns/">, myip=#<OpenStruct>, regip=#<OpenStruct url="https://ddns.duckcorp.org/", user="guihome-xxxxxxxxxxx", passwd="xxxxxxxxxxxx">, profiles=#<OpenStruct gh-parhome-nc.ddns.duckcorp.org=#<OpenStruct ipv4="auto", interface="eth6">>> /usr/bin/ddns-client:43:in `block (2 levels) in <main>': undefined method `[]' for #<OpenStruct ipv4="auto", interface="eth6"> (NoMethodError) from /usr/bin/ddns-client:42:in `each' from /usr/bin/ddns-client:42:in `block in <main>' from /usr/bin/ddns-client:41:in `each_pair' from /usr/bin/ddns-client:41:in `<main>
Files
Actions