mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 08:40:24 +00:00
Priorize the dynamically assigned IP
This commit is contained in:
@@ -56,6 +56,12 @@ if (&has_command("ip")) {
|
||||
$ifc{'address'} = $1;
|
||||
$ifc{'netmask'} = &prefix_to_mask("$3");
|
||||
}
|
||||
elsif ($l =~ /\sinet\s+([0-9\.]+)\/(\d+)(\s+metric\s+\d+)?(\s+brd\s+(\S+))?\s+scope\s+global(\s+(noprefixroute|dynamic|secondary))*\s+dynamic(\s+(noprefixroute|dynamic|secondary))*\s+(\S+)/ && $8 eq $ifc{'name'}) {
|
||||
# Line like :
|
||||
# inet 193.9.101.120/24 brd 193.9.101.255 scope global secondary dynamic br0
|
||||
$ifc{'address'} = $1;
|
||||
$ifc{'netmask'} = &prefix_to_mask("$2");
|
||||
}
|
||||
elsif ($l =~ /\sinet\s+([0-9\.]+)\/(\d+)(\s+metric\s+\d+)?(\s+brd\s+(\S+))?\s+scope\s+global(\s+(noprefixroute|dynamic|secondary))*\s+(\S+)/ && $8 eq $ifc{'name'}) {
|
||||
# Line like :
|
||||
# inet 193.9.101.120/24 brd 193.9.101.255 scope global br0
|
||||
|
||||
Reference in New Issue
Block a user