use GET['node_id'] to figure the node instead of from the incoming IP - thanks Thomas
authorThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 25 Sep 2013 17:00:34 +0000 (19:00 +0200)
committerThierry Parmentelat <thierry.parmentelat@inria.fr>
Wed, 25 Sep 2013 17:00:34 +0000 (19:00 +0200)
PlanetLabConf/ntp.conf.php

index 586e27b..4945fb0 100755 (executable)
@@ -16,14 +16,9 @@ $default_name = "default";
 $file_name = $config_directory . $file_prefix . $default_name;
 
 // Look up the node
-
-$interfaces = $adm->GetInterfaces(array('ip' => $_SERVER['REMOTE_ADDR']));
-
-if (!empty($interfaces)) {
-  $nodes = $adm->GetNodes(array($interfaces[0]['node_id']));
-  if (!empty($nodes)) {
-    $node = $nodes[0];
-  }
+$nodes = $adm->GetNodes(array('node_id' => (int)$_GET['node_id']));
+if (!empty($nodes)) {
+  $node = $nodes[0];
 }
 
 if (!isset($node)) {
@@ -31,6 +26,7 @@ if (!isset($node)) {
   exit();
 }
 
+
 $problem_models = array("Dell Precision 340", "Unknown");
 
 $hostname= trim($node['hostname']);