mirror of
https://github.com/RaspAP/raspap-webgui.git
synced 2024-11-24 08:30:26 +00:00
Update regex for optional src attribute
This commit is contained in:
parent
f18e867352
commit
4c4b3bae53
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ function getRouteInfo($checkAccess)
|
||||||
{
|
{
|
||||||
$rInfo = array();
|
$rInfo = array();
|
||||||
// get all default routes
|
// get all default routes
|
||||||
exec('ip route list | sed -rn "s/default via (([0-9]{1,3}\.){3}[0-9]{1,3}).*dev (\w*).*src (([0-9]{1,3}\.){3}[0-9]{1,3}).*/\3 \4 \1/p"', $routes);
|
exec('ip route list | sed -rn "s/default via (\b([0-9]{1,3}\.){3}[0-9]{1,3}).*dev (\w*)(.*((\b([0-9]{1,3}\.){3}[0-9]{1,3})))?/\3 \5 \1/p"', $routes);
|
||||||
$devpat = array("tun", "ppp"); // routing in case of VPN and PPP connection are different
|
$devpat = array("tun", "ppp"); // routing in case of VPN and PPP connection are different
|
||||||
foreach ($devpat as $pat) {
|
foreach ($devpat as $pat) {
|
||||||
exec('ip route list | grep -oP "'.$pat.'[0-9]" | sort -u', $devs);
|
exec('ip route list | grep -oP "'.$pat.'[0-9]" | sort -u', $devs);
|
||||||
|
|
Loading…
Reference in a new issue