@@ -206,8 +206,7 @@ |
||
| 206 | 206 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "accountstatus/"); |
| 207 | 207 | } elseif (strrpos($_SERVER['PHP_SELF'], "diag/")) { |
| 208 | 208 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "diag/"); |
| 209 | - } |
|
| 210 | - else { |
|
| 209 | + } else { |
|
| 211 | 210 | $cutoffPosition = strrpos($_SERVER['PHP_SELF'], "/"); |
| 212 | 211 | } |
| 213 | 212 | |
@@ -134,8 +134,9 @@ discard block |
||
| 134 | 134 | array_multisort($name, SORT_ASC, SORT_LOCALE_STRING, $displaylist); |
| 135 | 135 | setlocale(LC_ALL, $current_locale); |
| 136 | 136 | |
| 137 | - foreach ($displaylist as $id => $oneinst) |
|
| 138 | - echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>"; |
|
| 137 | + foreach ($displaylist as $id => $oneinst) { |
|
| 138 | + echo "<option id='" . $id . "' value='" . $oneinst['realmlist'] . "'>" . $oneinst['name'] . "</option>"; |
|
| 139 | + } |
|
| 139 | 140 | ?> |
| 140 | 141 | </select> |
| 141 | 142 | <button type='submit' class='submit'><?php echo _("Submit Information"); ?></button> |
@@ -198,10 +199,12 @@ discard block |
||
| 198 | 199 | $checkresult[$number] = $check['instance']->udpReachability($number, FALSE, FALSE); |
| 199 | 200 | if ($checkresult[$number] == \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { // so now things work?! |
| 200 | 201 | // either a packet size or Operator-Name problem! |
| 201 | - if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) |
|
| 202 | - $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 203 | - if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) |
|
| 204 | - $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 202 | + if ($check['instance']->udpReachability($number, TRUE, FALSE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { |
|
| 203 | + $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "OPERATOR-NAME", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 204 | + } |
|
| 205 | + if ($check['instance']->udpReachability($number, FALSE, TRUE) != \core\diag\RADIUSTests::RETVAL_CONVERSATION_REJECT) { |
|
| 206 | + $realmproblems[] = ["REALM" => $check['realm'], "STATUS" => "PACKETSIZE", "FROM" => $probe['display_name'], "DETAIL" => ""]; |
|
| 207 | + } |
|
| 205 | 208 | } else { // still no response or immediate reject |
| 206 | 209 | // if this is a CAT realm with anon ID set, we can't be seeing an NPS ignorance problem |
| 207 | 210 | // and consequently, the realm has actual issues |
@@ -235,12 +238,13 @@ discard block |
||
| 235 | 238 | // re-write check history with that extra knowledge |
| 236 | 239 | $copycat = $realmproblems; |
| 237 | 240 | |
| 238 | - foreach ($realmproblems as &$problem) |
|
| 239 | - if ($problem['STATUS'] == "REALM_POSSIBLY_NPS") |
|
| 241 | + foreach ($realmproblems as &$problem) { |
|
| 242 | + if ($problem['STATUS'] == "REALM_POSSIBLY_NPS") |
|
| 240 | 243 | foreach ($copycat as $otherproblem) |
| 241 | 244 | if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] != "REALM_POSSIBLY_NPS") |
| 242 | 245 | if ($otherproblem['STATUS'] == "REACHABLE") { // worked elsewhere, but not on this probe: |
| 243 | 246 | $problem['STATUS'] = "REALM_DOWN"; |
| 247 | + } |
|
| 244 | 248 | } else { // inherit other problem; in any case not an NPS problem |
| 245 | 249 | $problem['STATUS'] = $otherproblem['STATUS']; |
| 246 | 250 | } |
@@ -250,11 +254,12 @@ discard block |
||
| 250 | 254 | |
| 251 | 255 | $copycat = $realmproblems; |
| 252 | 256 | |
| 253 | - foreach ($realmproblems as &$problem) |
|
| 254 | - if ($problem['STATUS'] == "REALM_DOWN") |
|
| 257 | + foreach ($realmproblems as &$problem) { |
|
| 258 | + if ($problem['STATUS'] == "REALM_DOWN") |
|
| 255 | 259 | foreach ($copycat as $otherproblem) |
| 256 | 260 | if ($problem['REALM'] == $otherproblem['REALM'] && $problem['FROM'] != $otherproblem['FROM'] && $otherproblem['STATUS'] == "REACHABLE") |
| 257 | 261 | $problem['STATUS'] = "INFRASTRUCTURE"; |
| 262 | + } |
|
| 258 | 263 | unset($problem); |
| 259 | 264 | |
| 260 | 265 | // finally, extract all certprobs we got from the reachability checks; merge from all |
@@ -265,8 +270,9 @@ discard block |
||
| 265 | 270 | foreach ($checks as $check) { |
| 266 | 271 | $instance = $check['instance']; |
| 267 | 272 | $resultset = $instance->UDP_reachability_result; |
| 268 | - foreach ($resultset as $result) |
|
| 269 | - $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']); |
|
| 273 | + foreach ($resultset as $result) { |
|
| 274 | + $all_certprobs = array_merge($all_certprobs, $result['cert_oddities']); |
|
| 275 | + } |
|
| 270 | 276 | } |
| 271 | 277 | |
| 272 | 278 | // now we have something to say... |
@@ -124,8 +124,7 @@ |
||
| 124 | 124 | $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n"; |
| 125 | 125 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
| 126 | 126 | $out .= "Config.use_other_tls_id = True\n"; |
| 127 | - } |
|
| 128 | - else { |
|
| 127 | + } else { |
|
| 129 | 128 | $out .= "Config.use_other_tls_id = False\n"; |
| 130 | 129 | } |
| 131 | 130 | $tou = $this->mkUserConsent(); |