summaryrefslogtreecommitdiffstats
path: root/etc/inc
diff options
context:
space:
mode:
authorsmos <seth.mos@dds.nl>2012-06-04 10:20:58 +0200
committersmos <seth.mos@dds.nl>2012-06-04 10:20:58 +0200
commit6fdea6a2b649bece62644940d8cf4d42fe43ed59 (patch)
tree9121b13fb95fde32d12b0211d9c0bcb6832464f5 /etc/inc
parent3d36f9d1cefb7db127868211f697845f73389e90 (diff)
downloadpfsense-6fdea6a2b649bece62644940d8cf4d42fe43ed59.zip
pfsense-6fdea6a2b649bece62644940d8cf4d42fe43ed59.tar.gz
Allow for Null routes
Diffstat (limited to 'etc/inc')
-rw-r--r--etc/inc/gwlb.inc18
-rw-r--r--etc/inc/system.inc2
2 files changed, 18 insertions, 2 deletions
diff --git a/etc/inc/gwlb.inc b/etc/inc/gwlb.inc
index 6bc0cac..4fc5c37 100644
--- a/etc/inc/gwlb.inc
+++ b/etc/inc/gwlb.inc
@@ -321,7 +321,7 @@ function return_gateways_status($byname = false) {
}
/* Return all configured gateways on the system */
-function return_gateways_array($disabled = false) {
+function return_gateways_array($disabled = false, $locahost = false) {
global $config, $g;
$gateways_arr = array();
@@ -618,6 +618,22 @@ function return_gateways_array($disabled = false) {
$gateways_arr[$gateway['name']] = $gateway;
unset($gateway);
}
+
+ if($localhost === true) {
+ /* attach localhost for Null routes */
+ $gwlo4 = array();
+ $gwlo4['name'] = "Null4";
+ $gwlo4['interface'] = "lo0";
+ $gwlo4['ipprotocol'] = "inet";
+ $gwlo4['gateway'] = "127.0.0.1";
+ $gwlo6 = array();
+ $gwlo6['name'] = "Null6";
+ $gwlo6['interface'] = "lo0";
+ $gwlo6['ipprotocol'] = "inet6";
+ $gwlo6['gateway'] = "::1";
+ $gateways_arr['Null4'] = $gwlo4;
+ $gateways_arr['Null6'] = $gwlo6;
+ }
return($gateways_arr);
}
diff --git a/etc/inc/system.inc b/etc/inc/system.inc
index 357f47a..3324ca7 100644
--- a/etc/inc/system.inc
+++ b/etc/inc/system.inc
@@ -441,7 +441,7 @@ function system_routing_configure($interface = "") {
$static_routes = get_staticroutes();
if (count($static_routes)) {
- $gateways_arr = return_gateways_array();
+ $gateways_arr = return_gateways_array(false, true);
foreach ($static_routes as $rtent) {
$gatewayip = "";
OpenPOWER on IntegriCloud