fix check of client name
git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.7@13534 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
parent
e7f3c4dcfe
commit
affe91b7d3
@ -290,15 +290,27 @@ if ($inet6support) {
|
||||
}
|
||||
|
||||
my $validclient=0;
|
||||
my $node;
|
||||
foreach my $client (@clients) {
|
||||
$client =~ s/\..*//;
|
||||
($node) = noderange($client); #ensure this is coming from a node IP at least
|
||||
if ($node) { #Means the source isn't a valid deal...
|
||||
$validclient=1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
my $node;
|
||||
my $domain;
|
||||
my ($tmp) = $sitetab->getAttribs({'key'=>'domain'},'value');
|
||||
if (defined $tmp->{value}) {
|
||||
$domain = $tmp->{value};
|
||||
}
|
||||
foreach my $client (@clients) {
|
||||
$client =~ s/\..*//;
|
||||
if ($domain) {
|
||||
$client =~ s/\.$domain//;
|
||||
} else {
|
||||
$client =~ s/\..*//;
|
||||
}
|
||||
#ensure this is coming from a node IP at least
|
||||
($node) = noderange($client);
|
||||
if ($node) { #Means the source isn't valid
|
||||
$validclient=1;
|
||||
last;
|
||||
}
|
||||
}
|
||||
|
||||
unless ($validclient) {
|
||||
close($conn);
|
||||
next;
|
||||
|
Loading…
Reference in New Issue
Block a user