diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-03-10 19:13:00 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-03-10 19:13:00 +0000 |
commit | 8e21cbb8b243f865f0710dae230141a73139a92b (patch) | |
tree | 1ff979f0237de5bc0fe40c8d194c2e749a90dcd6 | |
parent | 010ae92efb3a3c6c7009eb6832f889458af3ce03 (diff) | |
download | pfsense-8e21cbb8b243f865f0710dae230141a73139a92b.zip pfsense-8e21cbb8b243f865f0710dae230141a73139a92b.tar.gz |
If OpenBGPD is installed, allow the selection of BGP as our
default gateway.
-rw-r--r-- | etc/inc/system.inc | 3 | ||||
-rwxr-xr-x | usr/local/www/system_gateways_edit.php | 10 |
2 files changed, 11 insertions, 2 deletions
diff --git a/etc/inc/system.inc b/etc/inc/system.inc index 03adc04..0589134 100644 --- a/etc/inc/system.inc +++ b/etc/inc/system.inc @@ -253,7 +253,8 @@ function system_routing_configure() { $interfacegw = $gateway['interface']; } } - mwexec("/sbin/route add default " . escapeshellarg($gatewayip)); + if($interfacegw <> "bgpd") + mwexec("/sbin/route add default " . escapeshellarg($gatewayip)); } else { /* adding gateway for 1.2-style configs without the new gateway setup configured. diff --git a/usr/local/www/system_gateways_edit.php b/usr/local/www/system_gateways_edit.php index a8b85e1..5355bcd 100755 --- a/usr/local/www/system_gateways_edit.php +++ b/usr/local/www/system_gateways_edit.php @@ -171,7 +171,15 @@ include("head.inc"); <option value="<?=$iface;?>" <?php if ($iface == $pconfig['interface']) echo "selected"; ?>> <?=htmlspecialchars($ifacename);?> </option> - <?php endforeach; ?> + <?php + endforeach; + if (is_package_installed("openbgpd") == 1) { + echo "<option value=\"bgpd\""; + if($pconfig['interface'] == "bgpd") + echo " selected"; + echo ">Use BGPD</option>"; + } + ?> </select> <br> <span class="vexpl">Choose which interface this gateway applies to.</span></td> </tr> |