diff options
Diffstat (limited to 'etc/inc/gwlb.inc')
-rw-r--r-- | etc/inc/gwlb.inc | 18 |
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); } |