mirror of
https://github.com/webmin/webmin.git
synced 2026-02-03 14:13:29 +00:00
Sometimes the ip command is used to add extra addresses http://virtualmin.com/node/37237
This commit is contained in:
@@ -117,10 +117,20 @@ foreach $iface (@ifaces) {
|
||||
elsif ($param eq "up" &&
|
||||
$value =~ /ifconfig\s+(\S+)\s+inet6\s+add\s+([a-f0-9:]+)\/(\d+)/ &&
|
||||
$1 eq $name) {
|
||||
# Additional v6 address
|
||||
# Additional v6 address with ifconfig command,
|
||||
# like :
|
||||
# ifconfig eth0 inet6 add 2607:f3:aaab:3::10/64
|
||||
push(@{$v6cfg->{'address6'}}, $2);
|
||||
push(@{$v6cfg->{'netmask6'}}, $3);
|
||||
}
|
||||
elsif ($param eq "up" &&
|
||||
$value =~ /ip\s+addr\s+add\s+([a-f0-9:]+)\/(\d+)\s+dev\s+(\S+)/ &&
|
||||
$3 eq $name) {
|
||||
# Additional v6 address with ip command, like :
|
||||
# ip addr add 2607:f3:aaab:3::10/64 dev eth0
|
||||
push(@{$v6cfg->{'address6'}}, $1);
|
||||
push(@{$v6cfg->{'netmask6'}}, $2);
|
||||
}
|
||||
}
|
||||
if ($method eq "manual" && !@{$v6cfg->{'address6'}}) {
|
||||
$v6cfg->{'auto6'} = 1;
|
||||
|
||||
Reference in New Issue
Block a user