net/quagga: merge version 1.4.3 from master

This commit is contained in:
Franco Fichtner 2017-12-12 07:56:56 +01:00
parent bc7b4c27ce
commit 8ca119c8cc
21 changed files with 52 additions and 91 deletions

View file

@ -1,5 +1,5 @@
PLUGIN_NAME= quagga
PLUGIN_VERSION= 1.4.2
PLUGIN_VERSION= 1.4.3
PLUGIN_COMMENT= Quagga Routing Suite
PLUGIN_DEPENDS= quagga ruby
PLUGIN_MAINTAINER= franz.fabian.94@gmail.com

View file

@ -1,8 +1,9 @@
Quagga is a routing software suite, providing implementations of
OSPFv2, OSPFv3, RIP v1 and v2, RIPv3, BGPv4 and experemental ISIS
for Unix platforms, particularly FreeBSD and Linux and also NetBSD,
to mention a few. Quagga is a fork of GNU Zebra which was developed
by Kunihiro Ishiguro. The Quagga tree aims to build a more involved
community around Quagga than the current centralised model of GNU Zebra.
OSPFv2, OSPFv3, RIP v1 and v2, RIPv3, BGPv4 for Unix platforms,
particularly FreeBSD and Linux and also NetBSD, to mention a few.
Quagga is a fork of GNU Zebra which was developed by Kunihiro Ishiguro.
The Quagga tree aims to build a more involved community around Quagga
than the current centralised model of GNU Zebra.
WWW: http://www.quagga.net/

View file

@ -58,6 +58,22 @@ function quagga_firewall($fw)
),
null
);
$fw->registerFilterRule(
1, /* priority */
array(
'ipprotocol' => 'inet',
'protocol' => 'ospf',
'statetype' => 'keep',
'label' => 'Pass OSPF UNICAST (autogenerated)',
'from' => $network->ipaddr . '/' . $network->netmask,
'to' => '(self)',
'direction' => 'in',
'type' => 'pass',
'disablereplyto' => 1,
'quick' => true
),
null
);
}
}
}

View file

@ -28,7 +28,6 @@ class BgpController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("BGP Settings");
$this->view->bgpForm = $this->getForm("bgp");
$this->view->formDialogEditBGPNeighbor = $this->getForm("dialogEditBGPNeighbor");
$this->view->formDialogEditBGPASPaths = $this->getForm("dialogEditBGPASPath");

View file

@ -28,28 +28,23 @@ class DiagnosticsController extends \OPNsense\Base\IndexController
{
public function bgpAction()
{
$this->view->title = gettext("Diagnostics: BGP");
$this->view->diagnosticsForm = $this->getForm("diagnostics");
$this->view->pick('OPNsense/Quagga/diagnosticsbgp');
}
public function ospfAction()
{
$this->view->title = gettext("Diagnostics: OSPF");
$this->view->pick('OPNsense/Quagga/diagnosticsospf');
}
public function ospfv3Action()
{
$this->view->title = gettext("Diagnostics: OSPFv3");
$this->view->pick('OPNsense/Quagga/diagnosticsospfv3');
}
public function generalAction()
{
$this->view->title = gettext("Diagnostics: General");
$this->view->pick('OPNsense/Quagga/diagnosticsgeneral');
}
public function logAction()
{
$this->view->title = gettext("Diagnostics: Log");
$this->view->pick('OPNsense/Quagga/log');
}
}

View file

@ -31,7 +31,6 @@ class GeneralController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("Routing-Settings");
$this->view->generalForm = $this->getForm("general");
$this->view->pick('OPNsense/Quagga/general');
}

View file

@ -1,38 +0,0 @@
<?php
/*
Copyright (C) 2017 Fabian Franz
All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY,
OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
*/
namespace OPNsense\Quagga;
class IsisController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("IS-IS-Settings");
$this->view->generalForm = $this->getForm("isis");
$this->view->pick('OPNsense/Quagga/isis');
}
}

View file

@ -28,7 +28,6 @@ class Ospf6Controller extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("OSPFv3 Settings");
$this->view->ospf6Form = $this->getForm("ospf6");
$this->view->formDialogEditInterface = $this->getForm("dialogEditOSPF6Interface");
$this->view->pick('OPNsense/Quagga/ospf6');

View file

@ -31,7 +31,6 @@ class OspfController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("OSPF Settings");
$this->view->generalForm = $this->getForm("ospf");
$this->view->formDialogEditNetwork = $this->getForm("dialogEditOSPFNetwork");
$this->view->formDialogEditInterface = $this->getForm("dialogEditOSPFInterface");

View file

@ -31,7 +31,6 @@ class RipController extends \OPNsense\Base\IndexController
{
public function indexAction()
{
$this->view->title = gettext("RIP Settings");
$this->view->ripForm = $this->getForm("rip");
$this->view->pick('OPNsense/Quagga/rip');
}

View file

@ -1,8 +0,0 @@
<form>
<field>
<id>routing.isis.general.Enabled</id>
<label>enable</label>
<type>checkbox</type>
<help>This will activate the isis service.</help>
</field>
</form>

View file

@ -25,7 +25,6 @@
<babel>Babel routing protocol (Babel)</babel>
<ospf>Open Shortest Path First (OSPF)</ospf>
<connected>Connected routes (directly attached subnet or host)</connected>
<isis>Intermediate System to Intermediate System (IS-IS)</isis>
<kernel>Kernel routes (not installed via the zebra RIB)</kernel>
<rip>Routing Information Protocol (RIP)</rip>
<static>Statically configured routes</static>

View file

@ -4,7 +4,6 @@
<RIP VisibleName="RIP" cssClass="fa fa-expand fa-fw" url="/ui/quagga/rip/index" order="10" />
<OSPF VisibleName="OSPF" cssClass="fa fa-map fa-fw" url="/ui/quagga/ospf/index" order="20" />
<OSPFv3 VisibleName="OSPFv3" cssClass="fa fa-map fa-fw" url="/ui/quagga/ospf6/index" order="25" />
<!--<ISIS VisibleName="IS-IS" cssClass="fa fa-bolt fa-fw" url="/ui/quagga/isis/index" order="30" />-->
<BGP VisibleName="BGPv4" cssClass="fa fa-globe fa-fw" url="/ui/quagga/bgp/index" order="40" />
<Diagnostics VisibleName="Diagnostics" cssClass="fa fa-medkit fa-fw" order="50">
<General VisibleName="General" url="/ui/quagga/diagnostics/general" order="1" />

View file

@ -34,7 +34,6 @@
<babel>Babel routing protocol (Babel)</babel>
<bgp>Border Gateway Protocol (BGP)</bgp>
<connected>Connected routes (directly attached subnet or host)</connected>
<isis>Intermediate System to Intermediate System (IS-IS)</isis>
<kernel>Kernel routes (not installed via the zebra RIB)</kernel>
<pim>Protocol Independent Multicast (PIM)</pim>
<ospf>Open Shortest Path First (OSPF)</ospf>

View file

@ -39,10 +39,9 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="general" class="tab-pane fade in active">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':bgpForm,'id':'frm_bgp_settings'])}}
<hr />
<div class="col-md-12">
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
</div>
@ -170,10 +169,12 @@ $(document).ready(function() {
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/quagga/bgp/set",formid='frm_bgp_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});

View file

@ -28,9 +28,9 @@ POSSIBILITY OF SUCH DAMAGE.
#}
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_general_settings'])}}
<hr />
<div class="col-md-12">
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
@ -48,12 +48,14 @@ POSSIBILITY OF SUCH DAMAGE.
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/quagga/general/set", formid='frm_general_settings',callback_ok=function(){
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
});
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
}, true);
});
});
</script>

View file

@ -1 +0,0 @@
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_ospf_settings'])}}

View file

@ -38,10 +38,9 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="general" class="tab-pane fade in active">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':generalForm,'id':'frm_ospf_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
</div>
@ -141,10 +140,12 @@ $( document ).ready(function() {
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/quagga/ospfsettings/set",formid='frm_ospf_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
@ -178,8 +179,7 @@ $( document ).ready(function() {
'options':{selection:false, multiSelect:false}
}
);
});
});
</script>
{{ partial("layout_partials/base_dialog",['fields':formDialogEditNetwork,'id':'DialogEditNetwork','label':lang._('Edit Network')])}}

View file

@ -37,10 +37,9 @@ POSSIBILITY OF SUCH DAMAGE.
<div id="general" class="tab-pane fade in active">
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':ospf6Form,'id':'frm_ospf6_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
</div>
@ -81,6 +80,7 @@ $( document ).ready(function() {
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
@ -88,13 +88,16 @@ $( document ).ready(function() {
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/quagga/ospf6settings/set",formid='frm_ospf6_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
$("#grid-interfaces").UIBootgrid(
{ 'search':'/api/quagga/ospf6settings/searchInterface',
'get':'/api/quagga/ospf6settings/getInterface/',
@ -105,9 +108,7 @@ $( document ).ready(function() {
'options':{selection:false, multiSelect:false}
}
);
});
});
</script>
{{ partial("layout_partials/base_dialog",['fields':formDialogEditInterface,'id':'DialogEditInterface','label':lang._('Edit Interface')])}}

View file

@ -26,12 +26,12 @@ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
POSSIBILITY OF SUCH DAMAGE.
#}
<div class="content-box" style="padding-bottom: 1.5em;">
{{ partial("layout_partials/base_form",['fields':ripForm,'id':'frm_rip_settings'])}}
<div class="col-md-12">
<hr />
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b></button>
<button class="btn btn-primary" id="saveAct" type="button"><b>{{ lang._('Save') }}</b> <i id="saveAct_progress"></i></button>
</div>
</div>
@ -42,6 +42,7 @@ $(document).ready(function() {
formatTokenizersUI();
$('.selectpicker').selectpicker('refresh');
});
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
@ -49,14 +50,14 @@ $(document).ready(function() {
// link save button to API set action
$("#saveAct").click(function(){
saveFormToEndpoint(url="/api/quagga/rip/set",formid='frm_rip_settings',callback_ok=function(){
$("#saveAct_progress").addClass("fa fa-spinner fa-pulse");
ajaxCall(url="/api/quagga/service/reconfigure", sendData={}, callback=function(data,status) {
ajaxCall(url="/api/quagga/service/status", sendData={}, callback=function(data,status) {
updateServiceStatusUI(data['status']);
});
$("#saveAct_progress").removeClass("fa fa-spinner fa-pulse");
});
});
});
});
});
</script>

View file

@ -11,7 +11,6 @@ if helpers.exists('OPNsense.quagga.rip.enabled') and OPNsense.quagga.rip.enabled
if helpers.exists('OPNsense.quagga.bgp.enabled') and OPNsense.quagga.bgp.enabled == '1' %} bgpd{% endif %}{%
if helpers.exists('OPNsense.quagga.ospf6.enabled') and OPNsense.quagga.ospf6.enabled == '1' %} ospf6d{% endif %}{%
if helpers.exists('OPNsense.quagga.ripng.enabled') and OPNsense.quagga.ripng.enabled == '1' %} ripngd{% endif %}{%
if helpers.exists('OPNsense.quagga.isis.enabled') and OPNsense.quagga.isis.enabled == '1' %} isisd{% endif %}"
#quagga_flags="...."
#quagga_extralibs_path="... ..."
#router_enable="NO"