-
Notifications
You must be signed in to change notification settings - Fork 380
Closed
Labels
bugSomething isn't workingSomething isn't workingneedinfoMore information is needed from the userMore information is needed from the user
Description
Hi All
I modified get IPv6 method from use=cmd to usev6=ifv6 but got error.
Current ddclient.conf
daemon=300
syslog=yes
mail=root
mail-failure=root
pid=/var/run/ddclient.pid
protocol=nsupdate
usev6=ifv6, ifv6=ng0
server=dns.epopen.com
password=/usr/local/etc/epopen.com.key
zone=epopen.com
ttl=3600
*.epopen.com
Debug by # ddclient -daemon=0 -debug -verbose and result as follows.
Case 1: Original work fine use=cmd
DEBUG: get_ip: using cmd, /sbin/ifconfig ng0 inet6 | /usr/bin/awk '{if($5 == "autoconf" && $6 == "temporary") { print }}' | /usr/bin/tail -n1 reports 2001:c211:c566:3ae:600c:2edb:1cea:7afa
INFO: forcing updating *.epopen.com because no cached entry exists.
DEBUG:
DEBUG: nic_nsupdate_update -------------------
INFO: setting IP address to 2001:c211:c566:3ae:600c:2edb:1cea:7afa for *.epopen.com
UPDATE: updating *.epopen.com
UPDATE: nsupdate command is: /usr/local/bin/nsupdate -k /usr/local/etc/epopen.com.key -d
UPDATE: nsupdate instructions are:
UPDATE: server dns.epopen.com
UPDATE: zone epopen.com.
UPDATE: update delete *.epopen.com. AAAA
UPDATE: update add *.epopen.com. 3600 AAAA 2001:c211:c566:3ae:600c:2edb:1cea:7afa
UPDATE: send
Creating key...
Creating key...
namefromtext
keycreate
Sending update to 10.10.23.55#53
Outgoing update query:
;; ->>HEADER<<- opcode: UPDATE, status: NOERROR, id: 39562
;; flags:; ZONE: 1, PREREQ: 0, UPDATE: 6, ADDITIONAL: 1
;; ZONE SECTION:
;epopen.com. IN SOA
Case 2: New not work usev6=ifv6
WARNING: 'if-skip' is deprecated and does nothing for IPv6
DEBUG: Reply from 'ifconfig -L ng0' :
DEBUG: ------
DEBUG: ng0: flags=10088d1<UP,POINTOPOINT,RUNNING,NOARP,SIMPLEX,MULTICAST,LOWER_UP> metric 0 mtu 1492
DEBUG: options=0
DEBUG: inet 122.117.86.253 --> 168.95.98.254 netmask 0xffffffff
DEBUG: inet6 fe80::d05c:1d7b:9084:f879%ng0 prefixlen 64 scopeid 0x5
DEBUG: inet6 2001:c211:c566:3ae:d05c:1d7b:9084:f879 prefixlen 64 autoconf
DEBUG: inet6 2001:c211:c566:3ae:94b9:ab87:ded8:e07 prefixlen 64 deprecated autoconf temporary pltime 0 vltime 441726
DEBUG: nd6 options=23<PERFORMNUD,ACCEPT_RTADV,AUTO_LINKLOCAL>
DEBUG: ------
DEBUG: Raw IPv6 after filtering for GUA addresses ng0: (1)
DEBUG: inet6 2001:c211:c566:3ae:d05c:1d7b:9084:f879 prefixlen 64 autoconf
DEBUG: get_ipv6: using (ifv6, ng0) reports 2001:c211:c566:3ae:d05c:1d7b:9084:f879
INFO: forcing updating *.epopen.com because no cached entry exists.
DEBUG:
DEBUG: nic_nsupdate_update -------------------
Use of uninitialized value $_[0] in sprintf at /usr/local/sbin/ddclient line 2294.
INFO: setting IP address to for *.epopen.com
UPDATE: updating *.epopen.com
Use of uninitialized value $ip in concatenation (.) or string at /usr/local/sbin/ddclient line 5981.
UPDATE: nsupdate command is: /usr/local/bin/nsupdate -k /usr/local/etc/epopen.com.key -d
UPDATE: nsupdate instructions are:
UPDATE: server dns.epopen.com
UPDATE: zone epopen.com.
UPDATE: update delete *.epopen.com. A
UPDATE: update add *.epopen.com. 3600 A
UPDATE: send
Creating key...
Creating key...
namefromtext
keycreate
could not read rdata
syntax error
WARNING: ddclient: failed closing | /usr/local/bin/nsupdate -k /usr/local/etc/ddns-ipv6-internal.epopen.com.key -d.()
FAILED: updating *.epopen.com
I tried to trace script
@ get_ipv6()
3259 warning("'if-skip' is deprecated and does nothing for IPv6") if (opt('verbose') && opt('if-skip', $h));
3260 $ipv6 = get_ip_from_interface($arg,6);
...
3327 debug("get_ipv6: using (%s, %s) reports %s", $usev6, $arg, $ipv6 // "<undefined>");
3328 return $ipv6;
And
@ update_nics()
1330 $config{$h}{'wantipv6'} = $ipv6 = $ip if (!$ipv6 && is_ipv6($ip));
1331 # But we will set 'wantip' to the IPv4 so old functions continue to work until we update them all
1332 $config{$h}{'wantip'} = $ipv4 if (!$ip && $ipv4);
Here problematic @ nic_nsupdate_update{} I think, because $ip get empty wanip due above $ipv4 = empty (Empty here correct).
In valid IPv6 existence, get IPv6 here I think.
5963 my $ip = $config{$h}{'wantip'};
Sorry, I'm not PERL programmer, mistake result possible.
Look like bug, can help fix?
Thanks a lot.
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't workingneedinfoMore information is needed from the userMore information is needed from the user