mirror of
https://github.com/webmin/webmin.git
synced 2026-03-20 16:50:24 +00:00
Detect duplicate ports
This commit is contained in:
@@ -557,6 +557,7 @@ net_topol=Nameserver choice topology
|
||||
net_recur=Allow recursive queries from
|
||||
net_err=Failed to save address and topology options
|
||||
net_eport='$1' is not a valid port number
|
||||
net_eusedport=Only one line of addresses is allowed for port $1
|
||||
net_etopology=No topology addresses entered
|
||||
net_erecur=No addresses to allow recursion from entered
|
||||
|
||||
|
||||
@@ -20,6 +20,8 @@ if (!$in{'listen_def'}) {
|
||||
&error(&text('net_eport', $in{"port_$i"}));
|
||||
$l->{'values'} = [ 'port', $in{"port_$i"} ];
|
||||
}
|
||||
$port = $in{"pdef_$i"} ? 53 : $in{"port_$i"};
|
||||
$used{$port}++ && &error(&text('net_eusedport', $port));
|
||||
$l->{'members'} =
|
||||
[ map { { 'name' => $_ } } split(/\s+/, $addr) ];
|
||||
push(@listen, $l);
|
||||
|
||||
Reference in New Issue
Block a user