summaryrefslogtreecommitdiff
blob: b57f78ba14e194c6413b157063ca393eec914465 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
--- a/ddclient	2018-08-09 17:58:16.000000000 +0200
+++ b/ddclient	2018-09-01 22:35:43.000000000 +0200
@@ -710,7 +710,7 @@
     [ "ip",          "=s", "-ip address           : set the IP address to 'address'" ],
     "",			     
     [ "if",          "=s", "-if interface         : obtain IP address from 'interface'" ],
-    [ "if-skip",     "=s", "-if-skip pattern      : skip any IP addresses before 'pattern' in the output of ifconfig {if}" ],
+    [ "if-skip",     "=s", "-if-skip pattern      : skip any IP addresses before 'pattern' in the output of ip addr show {if}" ],
     "",
     [ "web",         "=s", "-web provider|url     : obtain IP address from provider's IP checking page" ],
     [ "web-skip",    "=s", "-web-skip pattern     : skip any IP addresses before 'pattern' on the web provider|url" ],
@@ -1448,7 +1448,7 @@
 
     {
 	local $opt{'use'} = 'if';
-	foreach my $if (grep {/^[a-zA-Z]/} `ifconfig -a`) {
+	foreach my $if (grep {/^[a-zA-Z]/} `ip addr show`) {
 	    $if =~ s/:?\s.*//is;
 	    local $opt{'if'} = $if;
 	    printf "use=if, if=%s address is %s\n", opt('if'), define(get_ip('if'), 'NOT FOUND');
@@ -2165,7 +2165,7 @@
 
     } elsif ($use eq 'if') {
 	$skip  = opt('if-skip', $h)  || '';
-	$reply = `ifconfig $arg 2> /dev/null`;
+	$reply = `ip addr show $arg 2> /dev/null`;
 	$reply = `ip addr list dev $arg 2> /dev/null` if $?;
 	$reply = '' if $?;