diff options
author | Robert Bays <rbays@roatan.(none)> | 2010-04-06 22:55:34 -0700 |
---|---|---|
committer | Robert Bays <rbays@roatan.(none)> | 2010-04-06 22:55:34 -0700 |
commit | ec34f6ea95786d23a1567142b4078b9215c04aae (patch) | |
tree | 79a93b364a6decc372737061b62b045db5920343 | |
parent | 25f37a1bbaea83ddf120c0bc24b297488f67e633 (diff) | |
download | vyatta-cfg-quagga-ec34f6ea95786d23a1567142b4078b9215c04aae.tar.gz vyatta-cfg-quagga-ec34f6ea95786d23a1567142b4078b9215c04aae.zip |
more ipv6 and peer-group updates
87 files changed, 132 insertions, 118 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl index dc688729..392377a9 100755 --- a/scripts/bgp/vyatta-bgp.pl +++ b/scripts/bgp/vyatta-bgp.pl @@ -192,6 +192,7 @@ my %qcom = ( "protocols bgp var parameters no-fast-external-failover" => "router bgp #3 ; no bgp fast-external-failover", "protocols bgp var parameters router-id" => "router bgp #3 ; bgp router-id #6", "protocols bgp var parameters scan-time" => "router bgp #3 ; bgp scan-time #6", + "protocols bgp var peer-group" => undef, "protocols bgp var peer-group var" => "router bgp #3 ; neighbor #5 peer-group", "protocols bgp var peer-group var address-family" => undef, "protocols bgp var peer-group var address-family ipv6-unicast" => undef, @@ -265,7 +266,7 @@ my %qcom = ( "protocols bgp var peer-group var prefix-list" => undef, "protocols bgp var peer-group var prefix-list export" => "router bgp #3 ; neighbor #5 prefix-list #8 out", "protocols bgp var peer-group var prefix-list import" => "router bgp #3 ; neighbor #5 prefix-list #8 in", - "protocols bgp var peer-group var remote-as" => "router bgp #3 ; neighbor #5 remote-as #7", + "protocols bgp var peer-group var remote-as" => "router bgp #3 ; neighbor #5 peer-group ; neighbor #5 remote-as #7", "protocols bgp var peer-group var remove-private-as" => "router bgp #3 ; neighbor #5 remove-private-AS", "protocols bgp var peer-group var route-map" => undef, "protocols bgp var peer-group var route-map export" => "router bgp #3 ; neighbor #5 route-map #8 out", @@ -391,7 +392,7 @@ my %qcomdel = ( "protocols bgp var neighbor var filter-list import" => "router bgp #3 ; no neighbor #5 filter-list #8 in", "protocols bgp var neighbor var local-as" => "router bgp #3 ; no neighbor #5 local-as", "protocols bgp var neighbor var local-as no-prepend" => "router bgp #3 ; no neighbor #5 local-as #7 no-prepend ; neighbor #5 local-as #7", - "protocols bgp var neighbor var maximum-prefix" => "router bgp #3 ; no neighbor #5 maximum-prefix ", + "protocols bgp var neighbor var maximum-prefix" => "router bgp #3 ; no neighbor #5 maximum-prefix", "protocols bgp var neighbor var nexthop-self" => "router bgp #3 ; no neighbor #5 next-hop-self", "protocols bgp var neighbor var override-capability" => "router bgp #3 ; no neighbor #5 override-capability", "protocols bgp var neighbor var passive" => "router bgp #3 ; no neighbor #5 passive", @@ -448,6 +449,7 @@ my %qcomdel = ( "protocols bgp var parameters no-fast-external-failover" => "router bgp #3 ; bgp fast-external-failover", "protocols bgp var parameters router-id" => "router bgp #3 ; no bgp router-id #6", "protocols bgp var parameters scan-time" => "router bgp #3 ; no bgp scan-time #6", + "protocols bgp var peer-group" => undef, "protocols bgp var peer-group var" => "router bgp #3 ; no neighbor #5 peer-group", "protocols bgp var peer-group var address-family" => undef, "protocols bgp var peer-group var address-family ipv6-unicast" => undef, @@ -521,7 +523,7 @@ my %qcomdel = ( "protocols bgp var peer-group var prefix-list" => undef, "protocols bgp var peer-group var prefix-list export" => "router bgp #3 ; no neighbor #5 prefix-list #8 out", "protocols bgp var peer-group var prefix-list import" => "router bgp #3 ; no neighbor #5 prefix-list #8 in", - "protocols bgp var peer-group var remote-as" => "router bgp #3 ; no neighbor #5 remote-as #7", + "protocols bgp var peer-group var remote-as" => "router bgp #3 ; no neighbor #5", "protocols bgp var peer-group var remove-private-as" => "router bgp #3 ; no neighbor #5 remove-private-AS", "protocols bgp var peer-group var route-map" => undef, "protocols bgp var peer-group var route-map export" => "router bgp #3 ; no neighbor #5 route-map #8 out", @@ -531,7 +533,7 @@ my %qcomdel = ( "protocols bgp var peer-group var shutdown" => "router bgp #3 ; no neighbor #5 shutdown", "protocols bgp var peer-group var soft-reconfiguration" => undef, "protocols bgp var peer-group var soft-reconfiguration inbound" => "router bgp #3 ; no neighbor #5 soft-reconfiguration inbound", - "protocols bgp var peer-group var timers" => 'router bgp #3 ; no neighbor #5", + "protocols bgp var peer-group var timers" => "router bgp #3 ; no neighbor #5", "protocols bgp var peer-group var timers connect" => "router bgp #3 ; no neighbor #5 timers connect #8", "protocols bgp var peer-group var unsuppress-map" => "router bgp #3 ; no neighbor #5 unsuppress-map #7", "protocols bgp var peer-group var update-source" => "router bgp #3 ; no neighbor #5 update-source #7", @@ -556,50 +558,53 @@ my %qcomdel = ( ); my ( $pg, $as, $neighbor ); -my ( $main, $checkas, $peername, $checkifpeergroup, $checkpeergroups, $checksource ); +my ( $main, $checkas, $peername, $isneighbor, $checkpeergroupas, $checkpeergroups, $checksource ); GetOptions( - "peergroup=s" => \$pg, - "as=s" => \$as, - "neighbor=s" => \$neighbor, - "check-peer-name=s" => \$peername, - "check-as" => \$checkas, - "check-peer-groups" => \$checkpeergroups, - "check-if-peer-group" => \$checkifpeergroup, - "check-source=s" => \$checksource, - "main" => \$main, + "peergroup=s" => \$pg, + "as=s" => \$as, + "neighbor=s" => \$neighbor, + "check-peergroup-name=s" => \$peername, + "check-neighbor-ip" => \$isneighbor, + "check-as" => \$checkas, + "check-peergroup-as" => \$checkpeergroupas, + "check-peer-groups" => \$checkpeergroups, + "check-source=s" => \$checksource, + "main" => \$main, ); main() if ($main); -check_peer_name($peername) if ($peername); +check_peergroup_name($peername) if ($peername); +check_neighbor_ip($neighbor) if ($isneighbor); check_for_peer_groups( $pg, $as ) if ($checkpeergroups); -check_as( $neighbor, $as, $pg ) if ($checkas); -check_if_peer_group($pg) if ($checkifpeergroup); +check_neighbor_as( $neighbor, $as) if ($checkas); +check_peergroup_as( $neighbor, $as) if ($checkpeergroupas); check_source($checksource) if ($checksource); exit 0; -sub check_if_peer_group { +# Make sure the peer IP is properly formatted +sub check_neighbor_ip { my $neighbor = shift; - exit 1 if is_ip_v4_or_v6($neighbor); + exit 1 if ! is_ip_v4_or_v6($neighbor); exit 0; } -# Make sure the neighbor is a proper IP or name -sub check_peer_name { +# Make sure the peer-group name is properly formatted +sub check_peergroup_name { my $neighbor = shift; $_ = $neighbor; my $version = is_ip_v4_or_v6($neighbor); - if ( ( !defined($version) ) && (/[\s\W]/g) ) { - die "malformed neighbor address $neighbor\n"; + if ( ( defined($version) ) || (/[\s\W]/g) ) { + die "malformed peer-group name $neighbor\n"; } # Quagga treats the first byte as a potential IPv6 address # so we can't use it as a peer group name. So let's check for it. - if ( $version == 6 && /^[A-Fa-f]{1,4}$/ ) { - die "malformed neighbor address $neighbor\n"; + if (/^[A-Fa-f]{1,4}$/) { + die "malformed peer-group name $neighbor\n"; } } @@ -613,9 +618,6 @@ sub check_for_peer_groups { die "AS not defined\n" unless $as; my @peers; - # short circuit if the neighbor is an IP rather than name - return if is_ip_v4_or_v6($pg); - # get the list of neighbors and see if they have a peer-group set $config->setLevel("protocols bgp $as neighbor"); my @neighbors = $config->listNodes(); @@ -638,31 +640,40 @@ sub check_for_peer_groups { # make sure nodes are either in a peer group or have # a remote AS assigned to them. -sub check_as { - my ($neighbor, $as, $pg) = @_; +sub check_neighbor_as { + my ($neighbor, $as) = @_; die "neighbor not defined\n" unless $neighbor; die "AS not defined\n" unless $as; - # if this is peer-group then short circuit this - return if ! is_ip_v4_or_v6($neighbor); - my $config = new Vyatta::Config; $config->setLevel("protocols bgp $as neighbor $neighbor"); my $remoteas = $config->returnValue("remote-as"); return if defined $remoteas; - return if $pg; - my $peergroup = $config->returnValue("peer-group"); die "protocols bgp $as neighbor $neighbor: must define a remote-as or peer-group\n" unless $peergroup; - my $peergroupas = $config->returnValue(" .. $peergroup remote-as"); + my $peergroupas = $config->returnValue(" .. .. peer-group $peergroup remote-as"); die "protocols bgp $as neighbor $neighbor: must define a remote-as in neighbor or peer-group $peergroup\n" unless $peergroupas; } +# make sure peer-group has a remote-as +sub check_peergroup_as { + my ($neighbor, $as) = @_; + + die "neighbor not defined\n" unless $neighbor; + die "AS not defined\n" unless $as; + + my $config = new Vyatta::Config; + $config->setLevel("protocols bgp $as peer-group $neighbor"); + my $remoteas = $config->returnValue("remote-as"); + return if defined $remoteas; + die "protocols bgp $as peer-group $neighbor: must define a remote-as\n"; +} + # check that value is either an IPV4 address on system or an interface sub check_source { my $src = shift; @@ -678,15 +689,6 @@ sub check_source { } } -sub printQuaggaCommands { - my $cref = shift; - my @cmds; - my $cmd; - - $cref->returnQuaggaCommands(\@cmds); - foreach $cmd (@cmds) { print "$cmd\n"; } -} - sub main { # initialize the Quagga Config object with data from Vyatta config tree my $qconfig = new Vyatta::Quagga::Config('protocols', \%qcom, \%qcomdel); diff --git a/templates/protocols/bgp/node.tag/neighbor/node.def b/templates/protocols/bgp/node.tag/neighbor/node.def index af7f1b5c..76a4c836 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.def @@ -6,4 +6,4 @@ comp_help: <h:h:h:h:h:h:h:h> BGP neighbor IPv6 address syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ - --check-peer-name $VAR(@)" + --check-neighbor-ip --neighbor $VAR(@)" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index 64e7aa55..53ac8694 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1,3 @@ help: Set whether BGP attributes are sent unchanged commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index 05347f41..f58079cc 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,2 +1,4 @@ help: Set capability to receive the ORF commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" +commit:expression: $VAR(../../../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../../../@) neighbor $VAR(../../../../../../@): you can't set capability orf prefix-list send for a neighbor in a peer-group" + diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index 69696ee2..5d87e250 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,2 +1,3 @@ help: Set capability to send the ORF commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" +commit:expression: $VAR(../../../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../../../@) neighbor $VAR(../../../../../../@): you can't set capability orf prefix-list send for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def index 29e0708c..235f049d 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,2 +1,3 @@ help: Set to send default route to this neighbor commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def index 114c2142..035d6c4a 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/default-originate/route-map/node.def @@ -4,3 +4,4 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" " ; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) default-originate: route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set default-originate route-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 6423d08f..557e0325 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,2 +1,3 @@ help: Set to not send extended community attributes to this neighbor commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set disable-send-community extended for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index aa5a1004..d86b1030 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,2 +1,3 @@ help: Set to not send standard community attributes to this neighbor commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set disable-send-community standard for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index c00efb6c..883743c1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -11,3 +11,4 @@ commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../ commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index e7cac4a7..c1d01abe 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -7,3 +7,4 @@ commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../ commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set distribute-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index dd460e51..74a91681 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -7,3 +7,4 @@ comp_help: possible completions: <txt> as-path-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list export for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 0d6ff748..6d6b8d65 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -7,3 +7,4 @@ comp_help: possible completions: <txt> as-path-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" +commit:expression: $VAR(../../../../peer-group/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@): you can't set filter-list import for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index cb1eaa6c..b86137b1 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,2 +1,3 @@ help: Set nexthop for routes sent to this neighbor to be the local router commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set nexthop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index d44bf2e1..c25e42d2 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,2 +1,3 @@ help: Set to remove private AS numbers from AS path in outbound route updates commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index bea3ac85..cb87b992 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,3 +1,4 @@ help: Set neighbor as a route reflector client commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" -commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" +commit:expression: $VAR(@) == $VAR(../../../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set route-reflector-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def index f3cca5b8..2476a080 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,2 +1,3 @@ help: Set neighbor as route server client commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index 95af274c..2053b747 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -7,3 +7,4 @@ allowed: local -a params echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): route-map $VAR(@) doesn't exist" +commit:expression: $VAR(../../../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set unsuppress-map for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def index 9d6f2f12..cdce28d4 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def @@ -8,7 +8,6 @@ allowed: local -a params /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def index 76d48c47..ad3944ac 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def @@ -4,7 +4,6 @@ comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def index f510d1b7..47b1db77 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/export/node.def @@ -6,5 +6,4 @@ allowed: local -a params comp_help: possible completions: <txt> as-path-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def index 573ae57f..23d1a8a9 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/filter-list/import/node.def @@ -6,5 +6,4 @@ allowed: local -a params comp_help: possible completions: <txt> as-path-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def index 6341cde4..c0844ab6 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/export/node.def @@ -7,7 +7,6 @@ allowed: local -a params comp_help: possible completions: <txt> prefix-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def index 8c7e99a7..d4a1560e 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/prefix-list/import/node.def @@ -7,7 +7,6 @@ allowed: local -a params comp_help: possible completions: <txt> prefix-list name commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def index 66e09b24..59565211 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/export/node.def @@ -4,7 +4,6 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: route-map $VAR(@) doesn't exist" comp_help: possible completions: <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def index 3163940a..30dcc8ca 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/route-map/import/node.def @@ -4,7 +4,6 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" -commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: route-map $VAR(@) doesn't exist" comp_help: possible completions: <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def index ae2478a5..104a9509 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/unsuppress-map/node.def @@ -6,4 +6,5 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set unsuppress-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/parameters/dampening/node.def b/templates/protocols/bgp/node.tag/parameters/dampening/node.def index 6d5f09fe..a2784816 100644 --- a/templates/protocols/bgp/node.tag/parameters/dampening/node.def +++ b/templates/protocols/bgp/node.tag/parameters/dampening/node.def @@ -1,4 +1,3 @@ help: Enable route-flap dampening -delete:expression: "touch /tmp/bgp-dampening.$PPID" # Note that there is a bug in quagga here. If bgpd gets two 'no bgp dampening' # commands in a row it will crash diff --git a/templates/protocols/bgp/node.tag/peer-group/node.def b/templates/protocols/bgp/node.tag/peer-group/node.def index af7f1b5c..c773f6f0 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.def @@ -1,9 +1,11 @@ tag: type: txt -help: Set a BGP neighbor +help: Set a BGP peer-group comp_help: - <x.x.x.x> BGP neighbor IP address - <h:h:h:h:h:h:h:h> BGP neighbor IPv6 address + <name> BGP peer-group name syntax:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ - --check-peer-name $VAR(@)" + --check-peergroup-name $VAR(@)" +commit:expression: $VAR(./remote-as/) != ""; "protocols bgp $VAR(../@) peer-group $VAR(@): you must define a remote-as" +delete:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl \ + --check-peer-groups --peergroup $VAR(@) --as $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def index 1d8c1946..664b70a9 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/node.def @@ -1,2 +1,2 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def index 5775dd0a..4ca8b60f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/allowas-in/number/node.def @@ -2,4 +2,4 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def index 64e7aa55..cb660bfc 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/attribute-unchanged/node.def @@ -1,3 +1,3 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def index c05adfbe..c78c812c 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/dynamic/node.def @@ -1,2 +1,2 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def index 05347f41..a917862e 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/receive/node.def @@ -1,2 +1,2 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def index 69696ee2..f6dae787 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/capability/orf/prefix-list/send/node.def @@ -1,2 +1,2 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../../../@) --neighbor $VAR(../../../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def index 29e0708c..a696ce4e 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/default-originate/node.def @@ -1,2 +1,2 @@ help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def index 6423d08f..910e9d8d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/extended/node.def @@ -1,2 +1,2 @@ help: Set to not send extended community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def index aa5a1004..dd5f389b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/disable-send-community/standard/node.def @@ -1,2 +1,2 @@ help: Set to not send standard community attributes to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def index c00efb6c..7ab16827 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def @@ -7,7 +7,7 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def index e7cac4a7..a3b6c2b5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def @@ -3,7 +3,7 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list $VAR(@) doesn't exist" commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) distribute-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def index dd460e51..75a94dce 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/export/node.def @@ -5,5 +5,5 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def index 0d6ff748..50f0de8b 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/filter-list/import/node.def @@ -5,5 +5,5 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def index baff6c76..8859d66c 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/maximum-prefix/node.def @@ -2,4 +2,4 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def index 33ca0243..f1790cb4 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-local/unchanged/node.def @@ -1,2 +1,2 @@ help: Leave link-local nexthop unchanged for this peer -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def index cb1eaa6c..60115cbb 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/nexthop-self/node.def @@ -1,2 +1,2 @@ help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def index 905910f6..51cbc397 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/export/node.def @@ -6,7 +6,7 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> prefix-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" commit:expression: $VAR(../../distribute-list/export/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list export: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def index ddb5f5d4..111ad47e 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/prefix-list/import/node.def @@ -6,7 +6,7 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> prefix-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" commit:expression: $VAR(../../distribute-list/import/) == ""; "protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) prefix-list import: you can't set both a prefix-list and a distribute list" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def index d44bf2e1..4126e7b7 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/remove-private-as/node.def @@ -1,2 +1,2 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def index 0a366a1b..4dbca6be 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/export/node.def @@ -3,7 +3,7 @@ help: Set a route-map to filter outgoing route updates to this neighbor allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: route-map $VAR(@) doesn't exist" comp_help: possible completions: <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def index 3e5920c7..b0c0278d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-map/import/node.def @@ -3,7 +3,7 @@ help: Set a route-map to filter incoming route updates from this neighbor allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: route-map $VAR(@) doesn't exist" comp_help: possible completions: <txt> route-map name diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def index bea3ac85..9f95ebd7 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def @@ -1,3 +1,3 @@ help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def index f3cca5b8..d5378742 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-server-client/node.def @@ -1,2 +1,2 @@ help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def index b8bd724c..5ab933c5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/soft-reconfiguration/inbound/node.def @@ -1,3 +1,3 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def index 95af274c..dbdf0c3f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/unsuppress-map/node.def @@ -5,5 +5,5 @@ comp_help: possible completions: allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../@) --neighbor $VAR(../../../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../../@) neighbor $VAR(../../../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def index 67b47667..026dee4e 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/node.def @@ -1,2 +1,2 @@ help: Set to accept a route that contains the local-AS in the as-path -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def index 59bbf053..4677e1bc 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/allowas-in/number/node.def @@ -2,4 +2,4 @@ type: u32 help: Set number of occurrences of AS number comp_help: \1 <1-10>\tnumber of times AS is allowed in path syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 10; "allowas-in number must be between 1 and 10" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def index a23f4502..9268c97a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/attribute-unchanged/node.def @@ -1,3 +1,3 @@ help: Set whether BGP attributes are sent unchanged -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set attribute-unchanged for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def index 1ad03793..9867ed5f 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/dynamic/node.def @@ -1,2 +1,2 @@ help: Set to advertise dynamic capability to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def index f228a5c3..a20df446 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/receive/node.def @@ -1,3 +1,3 @@ help: Set capability to receive the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set orf capability receive for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def index aff136ca..7cc2ff83 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/capability/orf/prefix-list/send/node.def @@ -1,3 +1,3 @@ help: Set capability to send the ORF -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../../../@) --neighbor $VAR(../../../../@)" commit:expression: $VAR(../../../../peer-group/) == ""; "You can't set capability orf send for neighbor $VAR(../../../../@) in peer-group $VAR(../../../../peer-group/@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def index 675adffd..65e90e97 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/default-originate/node.def @@ -1,3 +1,3 @@ help: Set to send default route to this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocold bgp $VAR(../../@) neighbor $VAR(../@): you can't set default-originate for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def index f476e35e..9f1b61a1 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-capability-negotiation/node.def @@ -1,2 +1,2 @@ help: Set to not perform capability negotiation with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def index 98e3fb46..649d95ff 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-connected-check/node.def @@ -1,2 +1,2 @@ help: Disable check to see if EBGP peer's address is a connected route -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def index 9d6f2f12..c71cfc9a 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def @@ -7,7 +7,7 @@ allowed: local -a params params=( /opt/vyatta/config/active/policy/access-list/* /opt/vyatta/config/active/policy/access-list6/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: access-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def index 76d48c47..a8b94680 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def @@ -3,7 +3,7 @@ help: Set an access-list to filter incoming route updates from this neighbor comp_help: possible completions: <1-65535> access-list number <txt> access-list6 name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a distribute-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: access-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def index d35d050e..d9189858 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/ebgp-multihop/node.def @@ -2,5 +2,5 @@ type: u32 help: Allow this EBGP neighbor to not be on a directly connected network comp_help: possible completions: <1-255> number of hops -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" syntax:expression: $VAR(@) >=1 && $VAR(@) <= 255; "ebgp-multihop must be between 1 and 255" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def index f510d1b7..252733c2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/export/node.def @@ -5,6 +5,6 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list export: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def index 573ae57f..27d545f2 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/filter-list/import/node.def @@ -5,6 +5,6 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> as-path-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a filter-list for a neighbor in peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy as-path-list $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) filter-list import: as-path-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def index a7de0ea8..d114b437 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/local-as/node.def @@ -5,4 +5,4 @@ comp_help: possible completions: <1-4294967294> local AS number syntax:expression: $VAR(@) >=1 && $VAR(@) <= 4294967294; "local-as must be between 1 and 4294967294" commit:expression: $VAR(@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set local-as the same as the router AS" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def index 98a1129f..3dbf37c7 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def @@ -2,4 +2,4 @@ type: u32 help: Set the maximum number of prefixes to accept from this neighbor comp_help: possible completions: <1-4294967295> prefix limit -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def index ccbc5471..b49d0b36 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/nexthop-self/node.def @@ -1,3 +1,3 @@ help: Set nexthop for routes sent to this neighbor to be the local router -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) next-hop-self: you can't set next-hop-self for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def index 5eec1b35..2abf4417 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/override-capability/node.def @@ -1,3 +1,3 @@ help: Set to ignore capability negotiation with specified neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../strict-capability/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@) override-capability: you can't set both strict-capability and override-capability" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def index 46e8fc40..773c3679 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/passive/node.def @@ -1,2 +1,2 @@ help: Set to not try initiating a session with this neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def index 3a2f318d..242f0590 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/password/node.def @@ -5,3 +5,5 @@ syntax:expression: exec " \ echo Password must be 80 characters or less;\ exit 1 ; \ fi ; " +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" + diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def index 6341cde4..8760519e 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/export/node.def @@ -6,7 +6,7 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> prefix-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def index 8c7e99a7..1c5d48f0 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/prefix-list/import/node.def @@ -6,7 +6,7 @@ allowed: local -a params echo -n ${params[@]##*/} comp_help: possible completions: <txt> prefix-list name -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a prefix-list for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy prefix-list $VAR(@)\" "; \ "protocols bgp $VAR(../../../@) neighbor $VAR(../../@) prefix-list import: prefix-list $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def index c234d2fc..b03cfcf7 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/remove-private-as/node.def @@ -1,3 +1,3 @@ help: Set to remove private AS numbers from AS path in outbound route updates -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../../@): you can't set remove-private-as for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def index 66e09b24..acf73430 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/export/node.def @@ -3,7 +3,7 @@ help: Set a route-map to filter outgoing route updates to this neighbor allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) export: route-map $VAR(@) doesn't exist" comp_help: possible completions: diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def index 3163940a..1240c80d 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-map/import/node.def @@ -3,7 +3,7 @@ help: Set a route-map to filter incoming route updates from this neighbor allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../../@) --neighbor $VAR(../../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../../@) --neighbor $VAR(../../@)" commit:expression: $VAR(../../peer-group/) == ""; "protocols bgp $VAR(../../../@) neighbor $VAR(../../@): you can't set a route-map for a neighbor in a peer-group" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../../@) neighbor $VAR(../../@) import: route-map $VAR(@) doesn't exist" comp_help: possible completions: diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def index 2fce607f..9409fdf5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-reflector-client/node.def @@ -1,4 +1,4 @@ help: Set neighbor as a route reflector client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-reflector-client for a neighbor in a peer-group" commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../@) neighbor $VAR(../@) route-reflector-client: remote-as must equal local-as" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def index b1cb9e39..50345ba6 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/route-server-client/node.def @@ -1,3 +1,3 @@ help: Set neighbor as route server client -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: $VAR(../peer-group/) == ""; "protocols bgp $VAR(../../@) neighbor $VAR(../@): you can't set route-server-client for a neighbor in a peer-group" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def index 21863355..758a08b5 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/shutdown/node.def @@ -1,2 +1,2 @@ help: Set to administratively shut down neighbor -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def index b52799a6..dee71305 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/soft-reconfiguration/inbound/node.def @@ -1,3 +1,3 @@ help: Set inbound soft reconfiguration for this neighbor [REQUIRED] -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as \ +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as \ --as $VAR(../../../@) --neighbor $VAR(../../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def index 6fde9bd3..3265a524 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/node.def @@ -1,5 +1,5 @@ help: Set neighbor timers -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" # TODO: fix this. Can set connect &&|| (keepalive && holdtime) commit:expression: $VAR(./keepalive/) != ""; "protocols bgp $VAR(../../@) timers: you must set a keepalive interval" commit:expression: $VAR(./holdtime/) != ""; "protocols bgp $VAR(../../@) timers: you must set a holdtime interval" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def index ae2478a5..6e7c70a1 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/unsuppress-map/node.def @@ -5,5 +5,5 @@ comp_help: possible completions: allowed: local -a params params=( /opt/vyatta/config/active/policy/route-map/* ) echo -n ${params[@]##*/} -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy route-map $VAR(@)\" ";"protocols bgp $VAR(../../@) neighbor $VAR(../@): route-map $VAR(@) doesn't exist" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def index 63fc633c..cf7fbd30 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/update-source/node.def @@ -4,4 +4,4 @@ comp_help: <x.x.x.x> Set IP address of route source <interface> Set interface as route source commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-source $VAR(@)" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def index e5da2d21..bfcd14aa 100644 --- a/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def +++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/weight/node.def @@ -2,4 +2,4 @@ type: u32 help: Set default weight for routes from this neighbor comp_help: \1 <1-65535>\tweight for routes from this neighbor syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 65535; "weight must be between 1 and 65535" -commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-as --as $VAR(../../@) --neighbor $VAR(../@)" +commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-peergroup-as --as $VAR(../../@) --neighbor $VAR(../@)" |