From 56aecc8f03bc9f8535e252a934998612f26d5e72 Mon Sep 17 00:00:00 2001 From: ligc Date: Sun, 9 Oct 2011 00:34:38 +0000 Subject: [PATCH] fix for bug 3413432: conserver trust all ip addresses configured on local node git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@10714 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/conserver.pm | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/xCAT-server/lib/xcat/plugins/conserver.pm b/xCAT-server/lib/xcat/plugins/conserver.pm index 9cb744ef3..3b0a0d8b8 100644 --- a/xCAT-server/lib/xcat/plugins/conserver.pm +++ b/xCAT-server/lib/xcat/plugins/conserver.pm @@ -229,6 +229,23 @@ sub docfheaders { push @newheaders," trusted 127.0.0.1;\n"; my $master=xCAT::Utils->get_site_Master(); push @newheaders, " trusted $master;\n"; + # trust all the ip addresses configured on this node + my @allips = xCAT::Utils->gethost_ips(); + my @ips = (); + #remove $xcatmaster and duplicate entries + foreach my $ip (@allips) { + if (($ip eq "127.0.0.1") || ($ip eq $master)) { + next; + } + if(!grep(/^$ip$/, @ips)) { + push @ips,$ip; + } + } + if(scalar(@ips) > 0) { + my $ipstr = join(',', @ips); + push @newheaders, " trusted $ipstr;\n"; + } + push @newheaders,"}\n"; #push @$content,"#xCAT END ACCESS\n";