diff options
author | gnhb <gnoahb@gmail.com> | 2010-04-28 22:12:30 +0700 |
---|---|---|
committer | gnhb <gnoahb@gmail.com> | 2010-04-28 22:12:30 +0700 |
commit | 91a5b98a48643e0bb3fdbeffdb017da61e01c495 (patch) | |
tree | b471c3999d25192943a2b58551ed0dc30229938b /usr/local/www/interfaces_assign.php | |
parent | 047ae6abe6da3f667c59251e33bbe480debf64e6 (diff) | |
download | pfsense-91a5b98a48643e0bb3fdbeffdb017da61e01c495.zip pfsense-91a5b98a48643e0bb3fdbeffdb017da61e01c495.tar.gz |
Implement PPP config numbering scheme. Deleting a PPPx config doesn't renumber
the other config sections, but saving a new or existing config renumbers all
config sections. Update interfaces_assign to work properly with new scheme.
Diffstat (limited to 'usr/local/www/interfaces_assign.php')
-rwxr-xr-x | usr/local/www/interfaces_assign.php | 82 |
1 files changed, 41 insertions, 41 deletions
diff --git a/usr/local/www/interfaces_assign.php b/usr/local/www/interfaces_assign.php index 6d4dfe1..0d3c118 100755 --- a/usr/local/www/interfaces_assign.php +++ b/usr/local/www/interfaces_assign.php @@ -128,10 +128,10 @@ if (is_array($config['qinqs']['qinqentry']) && count($config['qinqs']['qinqentry /* add PPP interfaces */ if (is_array($config['ppps']['ppp']) && count($config['ppps']['ppp'])) { foreach ($config['ppps']['ppp'] as $pppid => $ppp) { - $portname = basename($ppp['port']); + $portname = $ppp['type'].$ppp['pppid']; $portlist[$portname] = $ppp; $portlist[$portname]['isppp'] = true; - $portlist[$portname]['descr'] = "PPP " . basename($ppp['port']); + $portlist[$portname]['descr'] = strtoupper($ppp['type']) . $ppp['pppid']." - ".$ppp['descr']; } } @@ -403,45 +403,45 @@ if(file_exists("/var/run/interface_mismatch_reboot_needed")) <td valign="middle" class="listr"> <select name="<?=$ifname;?>" id="<?=$ifname;?>"> <?php foreach ($portlist as $portname => $portinfo): ?> - <option value="<?=$portname;?>" <?php if ($portname == $iface['if']) echo "selected";?>> - <?php if ($portinfo['isvlan']) { - $descr = "VLAN {$portinfo['tag']} on {$portinfo['if']}"; - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['iswlclone']) { - $descr = $portinfo['cloneif']; - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['isppp']) { - echo htmlspecialchars($portinfo['descr']); - } elseif ($portinfo['isbridge']) { - $descr = strtoupper($portinfo['bridgeif']); - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['isgre']) { - $descr = "GRE {$portinfo['remote-addr']}"; - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['isgif']) { - $descr = "GRE {$portinfo['remote-addr']}"; - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['islagg']) { - $descr = strtoupper($portinfo['laggif']); - if ($portinfo['descr']) - $descr .= " (" . $portinfo['descr'] . ")"; - echo htmlspecialchars($descr); - } elseif ($portinfo['isqinq']) { - echo htmlspecialchars($portinfo['descr']); - } else - echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")"); - ?> - </option> + <option value="<?=$portname;?>" <?php if ($portname == $iface['if']) echo "selected";?>> + <?php if ($portinfo['isvlan']) { + $descr = "VLAN {$portinfo['tag']} on {$portinfo['if']}"; + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['iswlclone']) { + $descr = $portinfo['cloneif']; + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['isppp']) { + echo htmlspecialchars($portinfo['descr']); + } elseif ($portinfo['isbridge']) { + $descr = strtoupper($portinfo['bridgeif']); + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['isgre']) { + $descr = "GRE {$portinfo['remote-addr']}"; + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['isgif']) { + $descr = "GRE {$portinfo['remote-addr']}"; + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['islagg']) { + $descr = strtoupper($portinfo['laggif']); + if ($portinfo['descr']) + $descr .= " (" . $portinfo['descr'] . ")"; + echo htmlspecialchars($descr); + } elseif ($portinfo['isqinq']) { + echo htmlspecialchars($portinfo['descr']); + } else + echo htmlspecialchars($portname . " (" . $portinfo['mac'] . ")"); + ?> + </option> <?php endforeach; ?> </select> </td> |