mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
Don't add IP address if there isn't one
This commit is contained in:
@ -287,7 +287,7 @@ if (&has_command("ip")) {
|
||||
}
|
||||
|
||||
# Build ip command to add the new IP
|
||||
if ($readd) {
|
||||
if ($readd && $a->{'address'}) {
|
||||
$cmd .= "ip addr add ".quotemeta($a->{'address'});
|
||||
if ($a->{'netmask'}) {
|
||||
$cmd .= "/".&mask_to_prefix($a->{'netmask'});
|
||||
|
Reference in New Issue
Block a user