Add prefix to hostadresses when looking for routes

/32 and /128 is not shown in ip route command but wie need it to find the route in babel.

Signed-off-by: Robert Langhammer <rlanghammer@web.de>
This commit is contained in:
Robert Langhammer 2020-10-26 00:07:56 +01:00
parent 2a02908100
commit 53f88f5d0c
1 changed files with 7 additions and 0 deletions

View File

@ -125,6 +125,13 @@
echo "</table>";
if($_GET['ip'] != '') {
if ( preg_match("#/#", $_GET['ip']) == 0) {
if ( preg_match("#:#", $_GET['ip']) == 0) {
$_GET['ip'] = $_GET['ip'] . "/32";
} else {
$_GET['ip'] = $_GET['ip'] . "/128";
}
}
echo '<H2>Wege zu '.$_GET["ip"].'</H2>';
echo '<table>
<tr>