summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--etc/inc/system.inc3
-rwxr-xr-xusr/local/www/system_gateways_edit.php10
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>
OpenPOWER on IntegriCloud