[LON-CAPA-cvs] cvs: loncom / lond
albertel
lon-capa-cvs@mail.lon-capa.org
Tue, 08 Feb 2005 17:58:42 -0000
albertel Tue Feb 8 12:58:42 2005 EDT
Modified files:
/loncom lond
Log:
- fix auth issue when tryint to connect to myself over 127.0.0.1
Index: loncom/lond
diff -u loncom/lond:1.277 loncom/lond:1.278
--- loncom/lond:1.277 Sun Feb 6 02:39:49 2005
+++ loncom/lond Tue Feb 8 12:58:42 2005
@@ -2,7 +2,7 @@
# The LearningOnline Network
# lond "LON Daemon" Server (port "LOND" 5663)
#
-# $Id: lond,v 1.277 2005/02/06 07:39:49 albertel Exp $
+# $Id: lond,v 1.278 2005/02/08 17:58:42 albertel Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -58,7 +58,7 @@
my $status='';
my $lastlog='';
-my $VERSION='$Revision: 1.277 $'; #' stupid emacs
+my $VERSION='$Revision: 1.278 $'; #' stupid emacs
my $remoteVERSION;
my $currenthostid="default";
my $currentdomainid;
@@ -4741,18 +4741,23 @@
ReadManagerTable; # May also be a manager!!
- my $clientrec=($hostid{$clientip} ne undef);
- my $ismanager=($managers{$clientip} ne undef);
+ my $outsideip=$clientip;
+ if ($clientip eq '127.0.0.1') {
+ $outsideip=$hostip{$perlvar{'lonHostID'}};
+ }
+
+ my $clientrec=($hostid{$outsideip} ne undef);
+ my $ismanager=($managers{$outsideip} ne undef);
$clientname = "[unknonwn]";
if($clientrec) { # Establish client type.
$ConnectionType = "client";
- $clientname = $hostid{$clientip};
+ $clientname = $hostid{$outsideip};
if($ismanager) {
$ConnectionType = "both";
}
} else {
$ConnectionType = "manager";
- $clientname = $managers{$clientip};
+ $clientname = $managers{$outsideip};
}
my $clientok;