diff options
16 files changed, 55 insertions, 19 deletions
diff --git a/interface-templates/ip/ospf/bfd/node.def b/interface-templates/ip/ospf/bfd/node.def new file mode 100644 index 00000000..619b7415 --- /dev/null +++ b/interface-templates/ip/ospf/bfd/node.def @@ -0,0 +1,3 @@ +help: Enable Bidirectional Forwarding Detection (BFD) support +create:vtysh -c "configure terminal" -c "interface $IFNAME" -c "ip ospf bfd" +delete:vtysh -c "configure terminal" -c "interface $IFNAME" -c "no ip ospf bfd" diff --git a/interface-templates/ipv6/ospfv3/bfd/node.def b/interface-templates/ipv6/ospfv3/bfd/node.def new file mode 100644 index 00000000..7ef33bb7 --- /dev/null +++ b/interface-templates/ipv6/ospfv3/bfd/node.def @@ -0,0 +1,4 @@ +help: Enable Bidirectional Forwarding Detection (BFD) support +create:vtysh -c "configure terminal" -c "interface $VAR(../../../@)" -c "ipv6 ospf6 bfd" +delete:vtysh -c "configure terminal" -c "interface $VAR(../../../@)" -c "no ipv6 ospf6 bfd" + diff --git a/interface-templates/ipv6/ospfv3/network/node.def b/interface-templates/ipv6/ospfv3/network/node.def new file mode 100644 index 00000000..d1f6292d --- /dev/null +++ b/interface-templates/ipv6/ospfv3/network/node.def @@ -0,0 +1,9 @@ +type: txt +help: Network type +syntax:expression: $VAR(@) in "broadcast", "point-to-point"; \ + "Must be (broadcast|point-to-point)" +update:vtysh -c "configure terminal" -c "interface $IFNAME" -c "ipv6 ospf network $VAR(@)" +delete:vtysh -c "configure terminal" -c "interface $IFNAME" -c "no ipv6 ospf network" + +val_help: broadcast; Broadcast network type +val_help: point-to-point; Point-to-point network type diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index 2a3ca514..93fb601f 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -563,6 +563,10 @@ my %qcom = ( set => 'router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7 no-prepend', del => 'router bgp #3 ; no neighbor #5 local-as #7 no-prepend ; neighbor #5 local-as #7', }, + 'protocols bgp var neighbor var local-as var no-prepend replace-as' => { + set => 'router bgp #3 ; no neighbor #5 local-as #7 ; neighbor #5 local-as #7 no-prepend replace-as', + del => 'router bgp #3 ; neighbor #5 local-as #7 no-prepend', + }, 'protocols bgp var neighbor var override-capability' => { set => 'router bgp #3 ; neighbor #5 override-capability', del => 'router bgp #3 ; no neighbor #5 override-capability', @@ -571,6 +575,10 @@ my %qcom = ( set => 'router bgp #3 ; neighbor #5 passive', del => 'router bgp #3 ; no neighbor #5 passive', }, + 'protocols bgp var neighbor var bfd' => { + set => 'router bgp #3 ; neighbor #5 bfd', + del => 'router bgp #3 ; no neighbor #5 bfd', + }, 'protocols bgp var neighbor var password' => { set => 'router bgp #3 ; neighbor #5 password #7', del => 'router bgp #3 ; no neighbor #5 password', @@ -1104,6 +1112,10 @@ my %qcom = ( set => 'router bgp #3 ; neighbor #5 passive', del => 'router bgp #3 ; no neighbor #5 passive', }, + 'protocols bgp var peer-group var bfd' => { + set => 'router bgp #3 ; neighbor #5 bfd', + del => 'router bgp #3 ; no neighbor #5 bfd', + }, 'protocols bgp var peer-group var password' => { set => 'router bgp #3 ; neighbor #5 password #7', del => 'router bgp #3 ; no neighbor #5 password', diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def index ccb033fc..9bf94abb 100644 --- a/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/community/node.def @@ -5,8 +5,9 @@ val_help: local-AS; Advertise communities in local AS only (NO_EXPORT_SUBCONFED) val_help: no-advertise; Don't advertise this route to any peer (NO_ADVERTISE) val_help: no-export; Don't advertise outside of this AS of confederation boundry (NO_EXPORT) val_help: internet; Symbolic Internet community 0 +val_help: additive; Add the community instead of replacing existing communities -allowed:echo "none local-AS no-advertise no-export internet" +allowed:echo "none local-AS no-advertise no-export internet additive" syntax:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --check-community $VAR(@)" commit:expression: $VAR(../../action/) != "" ; "You must specify an action" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def index c2a810e4..ac51c00b 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.def @@ -1,9 +1,9 @@ tag: type: txt help: BGP neighbor -val_help: txt; BGP neighbor IP address -val_help: txt; BGP neighbor IPv6 address -val_help: txt; Interface name +val_help: ipv4; BGP neighbor IP address +val_help: ipv6; BGP neighbor IPv6 address +val_help: <interface>; Interface name syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ --check-neighbor-ip --neighbor $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/bfd/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/bfd/node.def new file mode 100644 index 00000000..284ce4d8 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/bfd/node.def @@ -0,0 +1 @@ +help: Enable Bidirectional Forwarding Detection (BFD) support diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/remote-as/node.def index 61cd13a0..80edfd4d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/remote-as/node.def @@ -1,6 +1,7 @@ type: txt help: Neighbor BGP AS number [REQUIRED] -val_help: txt: 1-4294967294; Neighbor AS number -val_help: txt: external; except that if the peers ASN is different than mine -val_help: txt: internal; except that if the peers ASN is the same as mine +allowed: echo "internal external" +val_help: u32:1-4294967294; Neighbor AS number +val_help: external; any AS different from the local AS +val_help: internal; same as the local AS syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-remote-as $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/v6only/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/v6only/remote-as/node.def index 61cd13a0..80edfd4d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/v6only/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/interface/v6only/remote-as/node.def @@ -1,6 +1,7 @@ type: txt help: Neighbor BGP AS number [REQUIRED] -val_help: txt: 1-4294967294; Neighbor AS number -val_help: txt: external; except that if the peers ASN is different than mine -val_help: txt: internal; except that if the peers ASN is the same as mine +allowed: echo "internal external" +val_help: u32:1-4294967294; Neighbor AS number +val_help: external; any AS different from the local AS +val_help: internal; same as the local AS syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-remote-as $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.tag/no-prepend/replace-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.tag/no-prepend/replace-as/node.def new file mode 100644 index 00000000..52fbc0b0 --- /dev/null +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.tag/no-prepend/replace-as/node.def @@ -0,0 +1 @@ +help: Only prepend local-as when transmitting local-route updates to this peer. diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def index 61cd13a0..79939380 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/remote-as/node.def @@ -1,6 +1,7 @@ type: txt help: Neighbor BGP AS number [REQUIRED] -val_help: txt: 1-4294967294; Neighbor AS number -val_help: txt: external; except that if the peers ASN is different than mine -val_help: txt: internal; except that if the peers ASN is the same as mine +allowed: echo "internal external" +val_help: u32:1-4294967294; AS number +val_help: external; any AS different from the local AS +val_help: internal; same as local AS syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-remote-as $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/bfd/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/bfd/node.def new file mode 100644 index 00000000..284ce4d8 --- /dev/null +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/bfd/node.def @@ -0,0 +1 @@ +help: Enable Bidirectional Forwarding Detection (BFD) support diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def index 61cd13a0..80edfd4d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remote-as/node.def @@ -1,6 +1,7 @@ type: txt help: Neighbor BGP AS number [REQUIRED] -val_help: txt: 1-4294967294; Neighbor AS number -val_help: txt: external; except that if the peers ASN is different than mine -val_help: txt: internal; except that if the peers ASN is the same as mine +allowed: echo "internal external" +val_help: u32:1-4294967294; Neighbor AS number +val_help: external; any AS different from the local AS +val_help: internal; same as the local AS syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-remote-as $VAR(@)" diff --git a/templates/protocols/ospf/passive-interface/node.def b/templates/protocols/ospf/passive-interface/node.def index f73f9166..ed5d17cb 100644 --- a/templates/protocols/ospf/passive-interface/node.def +++ b/templates/protocols/ospf/passive-interface/node.def @@ -28,7 +28,7 @@ delete: if [ -z $VAR(@) ] else if [ "$VAR(@)" == "default" ] then - if [ $VAR(../passive-interface-exclude/@) ] + if [ ! -z "$VAR(../passive-interface-exclude/@)" ] then echo "Error: delete passive-interface-exclude before deleting passive-interface default"; exit 1; diff --git a/templates/protocols/static/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/route/node.tag/dhcp-interface/node.def index db83853d..7820800b 100644 --- a/templates/protocols/static/route/node.tag/dhcp-interface/node.def +++ b/templates/protocols/static/route/node.tag/dhcp-interface/node.def @@ -2,7 +2,7 @@ type: txt help: DHCP interface that supplies the next-hop IP address for this static route allowed: local -a array ; - array=( /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; + array=( /var/lib/dhcp/en* /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; echo -n ${array[@]##*/} create: sudo /opt/vyatta/sbin/vyatta-update-static-route.pl --interface=$VAR(@) --route=$VAR(../@) --table=main --option=create diff --git a/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def b/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def index a86628ae..3f0afdb1 100644 --- a/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def +++ b/templates/protocols/static/table/node.tag/route/node.tag/dhcp-interface/node.def @@ -2,7 +2,7 @@ type: txt help: DHCP interface that supplies the next-hop IP address for this static route allowed: local -a array ; - array=( /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; + array=( /var/lib/dhcp/en* /var/lib/dhcp/eth* /var/lib/dhcp/br* /var/lib/dhcp/bond* ) ; echo -n ${array[@]##*/} create: ifc="$VAR(@)" |