summaryrefslogtreecommitdiffstats
path: root/etc/inc/gwlb.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/gwlb.inc
parent3d36f9d1cefb7db127868211f697845f73389e90 (diff)
downloadpfsense-6fdea6a2b649bece62644940d8cf4d42fe43ed59.zip
pfsense-6fdea6a2b649bece62644940d8cf4d42fe43ed59.tar.gz
Allow for Null routes
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r--etc/inc/gwlb.inc18
1 files changed, 17 insertions, 1 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);
}
OpenPOWER on IntegriCloud