diff options
author | Bill Marquette <billm@pfsense.org> | 2005-06-11 03:55:24 +0000 |
---|---|---|
committer | Bill Marquette <billm@pfsense.org> | 2005-06-11 03:55:24 +0000 |
commit | fe038cb6b97cf2621f45bc36429e0e3fc63df7bc (patch) | |
tree | 0f469f82c8ef946fada31581388ecef344f1ee1e /usr/local | |
parent | 3eb4f771863be8119d29123df5ff31119ea68153 (diff) | |
download | pfsense-fe038cb6b97cf2621f45bc36429e0e3fc63df7bc.zip pfsense-fe038cb6b97cf2621f45bc36429e0e3fc63df7bc.tar.gz |
Grab default route as a gateway, interface might be dynamic
Diffstat (limited to 'usr/local')
-rwxr-xr-x | usr/local/www/firewall_rules_edit.php | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/usr/local/www/firewall_rules_edit.php b/usr/local/www/firewall_rules_edit.php index 5bb48c6..ad67024 100755 --- a/usr/local/www/firewall_rules_edit.php +++ b/usr/local/www/firewall_rules_edit.php @@ -774,6 +774,9 @@ Hint: the difference between block and reject is that with reject, a packet (TCP <?php /* build a list of gateways */ $gateways = array(); + exec("/sbin/route -n get default |/usr/bin/grep gateway", $defroute); + preg_match("/(\d+\.\d+\.\d+\.\d+)/", $defroute[0], $matches); + $gateways[] = $matches[1]; foreach($config['interfaces'] as $int) { if($int['gateway'] <> "") $gateways[]=$int['gateway']; |