Detect duplicate ports

This commit is contained in:
Jamie Cameron
2007-10-18 01:32:57 +00:00
parent 70612ae921
commit cc4f1586c7
2 changed files with 3 additions and 0 deletions

View File

@@ -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

View File

@@ -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);