summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/bgp/vyatta-bgp.pl87
-rw-r--r--templates/protocols/bgp/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def8
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def8
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/export/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def5
-rw-r--r--templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def1
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/export/node.def8
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/distribute-list/import/node.def8
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/address-family/ipv6-unicast/route-reflector-client/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def2
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/export/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/distribute-list/import/node.def4
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/maximum-prefix/node.def1
-rw-r--r--templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def5
18 files changed, 106 insertions, 51 deletions
diff --git a/scripts/bgp/vyatta-bgp.pl b/scripts/bgp/vyatta-bgp.pl
index 849b4284..e4e626e6 100755
--- a/scripts/bgp/vyatta-bgp.pl
+++ b/scripts/bgp/vyatta-bgp.pl
@@ -405,7 +405,7 @@ my %qcom = (
},
'protocols bgp var neighbor var local-as var no-prepend' => {
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',
+ del => 'router bgp #3 ; no neighbor #5 local-as #7 no-prepend ; neighbor #5 local-as #7',
},
'protocols bgp var neighbor var maximum-prefix' => {
set => 'router bgp #3 ; neighbor #5 maximum-prefix #7',
@@ -448,7 +448,7 @@ my %qcom = (
del => 'router bgp #3 ; no neighbor #5 prefix-list #8 in',
},
'protocols bgp var neighbor var remote-as' => {
- set => 'router bgp #3 ; neighbor #5 remote-as #7',
+ set => 'router bgp #3 ; neighbor #5 remote-as #7 ; neighbor #5 activate',
del => 'router bgp #3 ; no neighbor #5 remote-as #7',
},
'protocols bgp var neighbor var remove-private-as' => {
@@ -942,7 +942,7 @@ my %qcom = (
},
'protocols bgp var peer-group var password' => {
set => 'router bgp #3 ; neighbor #5 password #7',
- del => 'router bgp #3 ; no neighbor #5 password #7',
+ del => 'router bgp #3 ; no neighbor #5 password',
},
'protocols bgp var peer-group var port' => {
set => 'router bgp #3 ; neighbor #5 port #7',
@@ -1019,7 +1019,7 @@ my %qcom = (
},
'protocols bgp var peer-group var update-source' => {
set => 'router bgp #3 ; neighbor #5 update-source #7',
- del => 'router bgp #3 ; no neighbor #5 update-source #7',
+ del => 'router bgp #3 ; no neighbor #5 update-source',
},
'protocols bgp var peer-group var weight' => {
set => 'router bgp #3 ; neighbor #5 weight #7',
@@ -1096,7 +1096,7 @@ my %qcom = (
);
my ( $pg, $as, $neighbor );
-my ( $main, $peername, $isneighbor, $checkpeergroups, $checksource );
+my ( $main, $peername, $isneighbor, $checkpeergroups, $checksource, $checklocalas );
GetOptions(
"peergroup=s" => \$pg,
@@ -1106,6 +1106,7 @@ GetOptions(
"check-neighbor-ip" => \$isneighbor,
"check-peer-groups" => \$checkpeergroups,
"check-source=s" => \$checksource,
+ "check-local-as" => \$checklocalas,
"main" => \$main,
);
@@ -1114,6 +1115,7 @@ check_peergroup_name($peername) if ($peername);
check_neighbor_ip($neighbor) if ($isneighbor);
check_for_peer_groups( $pg, $as ) if ($checkpeergroups);
check_source($checksource) if ($checksource);
+check_local_as($neighbor, $as) if ($checklocalas);
exit 0;
@@ -1179,23 +1181,92 @@ sub check_remote_as {
my @asns = $config->listNodes();
foreach my $as (@asns) {
+ # check remote-as if neighbors have been changed
my @neighbors = $config->listNodes("$as neighbor");
foreach my $neighbor (@neighbors) {
if ($config->isChanged("$as neighbor $neighbor")) {
my $remoteas = $config->returnValue("$as neighbor $neighbor remote-as");
+
+ my ($peergroup, $peergroupas);
+ if ($config->exists("$as neighbor $neighbor peer-group")) {
+ $peergroup = $config->returnValue("$as neighbor $neighbor peer-group");
+ if ($config->exists("$as peer-group $peergroup remote-as")) {
+ $peergroupas = $config->returnValue("$as peer-group $peergroup remote-as");
+ }
+ }
+
if ($remoteas) {
+ if ($peergroupas) {
+ die "protocols bgp $as neighbor $neighbor: remote-as should not be defined in both neighbor and peer-group\n"
+ }
return;
}
- my $peergroup = $config->returnValue("$as neighbor $neighbor peer-group");
+
die "protocols bgp $as neighbor $neighbor: must define a remote-as or peer-group\n"
unless $peergroup;
-
- my $peergroupas = $config->returnValue("$as 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;
}
}
+
+ # check remote-as if peer-groups have been changed
+ my @peergroups = $config->listNodes("$as peer-group");
+ foreach my $peergroup (@peergroups) {
+ if ($config->isChanged("$as peer-group $peergroup")) {
+
+ # if we delete the remote-as in the pg, make sure all neighbors have a remote-as defined
+ if ($config->isDeleted("$as peer-group $peergroup remote-as")) {
+ my @neighbors = $config->listNodes("$as neighbor");
+ foreach my $neighbor (@neighbors) {
+ my $pgmembership = $config->returnValue("$as neighbor $neighbor peer-group");
+ if ( (defined $pgmembership) && ("$pgmembership" eq "$peergroup") ) {
+ my $remoteas = $config->returnValue("$as neighbor $neighbor remote-as");
+ if (! defined $remoteas) {
+ die "protocols bgp $as peer-group $neighbor: can't delete the remote-as in peer-group without setting remote-as in members\n"
+ }
+ }
+ }
+ }
+
+ # remote-as can not be defined in both pg and neighbor at the same time
+ if ($config->isChanged("$as peer-group $peergroup remote-as")) {
+ my $pgremoteas = $config->returnValue("$as peer-group $peergroup remote-as");
+ my @neighbors = $config->listNodes("$as neighbor");
+ foreach my $neighbor (@neighbors) {
+ my $pgmembership = $config->returnValue("$as neighbor $neighbor peer-group");
+ if ( (defined $pgmembership) && ("$pgmembership" eq "$peergroup") ) {
+ my $remoteas = $config->returnValue("$as neighbor $neighbor remote-as");
+ if (defined $remoteas && defined $pgremoteas) {
+ die "protocols bgp $as peer-group $neighbor: must not define remote-as in both neighbor and peer-group\n"
+ }
+ }
+ }
+ }
+
+ }
+ } # end foreach my $peergroup
+ }
+
+}
+
+# Verify that is local-as is used, the peer isn't in a confedration
+sub check_local_as {
+ my ($neighbor, $as) = @_;
+ my $config = new Vyatta::Config;
+
+ $config->setLevel("protocols bgp $as");
+ if ($config->exists('parameters confederation peers')) {
+ my @peers = $config->returnValues('parameters confederation peers');
+ my $remoteas = $config->returnValue("neighbor $neighbor remote-as");
+ foreach my $peeras (@peers) {
+ if ("$peeras" eq "$remoteas") {
+ print "local-as can't be set for neighbors in a peer group\n";
+ return 1;
+ }
+ }
}
+ return 0;
}
# check that value is either an IPV4 address on system or an interface
diff --git a/templates/protocols/bgp/node.def b/templates/protocols/bgp/node.def
index 8184995e..4047936e 100644
--- a/templates/protocols/bgp/node.def
+++ b/templates/protocols/bgp/node.def
@@ -1,4 +1,4 @@
-tag:
+tag:1
priority: 730
type: u32
help: Configure Border Gateway Protocol (BGP) parameters
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 d24af594..9dc786eb 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
@@ -1,12 +1,10 @@
type: txt
help: Set an access-list to filter outgoing route updates to this neighbor
comp_help: possible completions:
- <1-65535> access-list number
<txt> access-list6 name
allowed: local -a params
- params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list;
- /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
echo -n ${params[@]##*/}
-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: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" "; \
+"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) export: access-list6 $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/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 dccb1b14..11db6cfa 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
@@ -1,12 +1,10 @@
type: txt
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
allowed: local -a params
- params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list;
- /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
echo -n ${params[@]##*/}
-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: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";\
+"protocols bgp $VAR(../../../../../@) neighbor $VAR(../../../../@) import: access-list6 $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/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 2c99f906..e916667e 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,3 @@
help: Set neighbor as a route reflector client
-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/disable-send-community/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def
index c760705e..b0b6bcca 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/disable-send-community/node.def
@@ -1,2 +1,2 @@
help: Set to not send community attributes to this neighbor
-commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../@) neighbor $(../@): you must specify the type of community"
+commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $VAR(../../@) neighbor $VAR(../@): you must specify the type of community"
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 bd51c71d..2867afbb 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
@@ -2,10 +2,8 @@ type: txt
help: Set an access-list to filter outgoing route updates to this neighbor
comp_help: possible completions:
<1-65535> access-list number
- <txt> access-list6 name
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/access-list/*
- /opt/vyatta/config/active/policy/access-list6/* )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list )
echo -n ${params[@]##*/}
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/neighbor/node.tag/distribute-list/import/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/distribute-list/import/node.def
index 9c88fd5e..9841ca6c 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
@@ -2,10 +2,8 @@ type: txt
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
allowed: local -a params
- params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list;
- /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list )
echo -n ${params[@]##*/}
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/neighbor/node.tag/local-as/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def
index 54826976..bf0b1361 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/local-as/node.def
@@ -1,7 +1,10 @@
-tag:
+tag:1
type: u32
help: Set the local AS number [REQUIRED]
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: $VAR(../remote-as/@) != $VAR(../../@); "protocols bgp $VAR(../../@) neighbor $VAR(../@): local-as can't be set on iBGP peers"
+commit:expression: exec "/opt/vyatta/sbin/vyatta-bgp.pl --check-local-as --neighbor $VAR(../@) --as $VAR(../../@)"
+
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def
index de6ecf41..f517821d 100644
--- a/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def
+++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/maximum-prefix/node.def
@@ -2,3 +2,4 @@ type: u32
help: Set the maximum number of prefixes to accept from this neighbor
comp_help: possible completions:
<1-4294967295> prefix limit
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967295; "maximum-prefix must be between 1 and 4294967295"
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 8cd7aeee..0e127e40 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
@@ -1,12 +1,10 @@
type: txt
help: Set an access-list to filter outgoing route updates to this peer-group
comp_help: possible completions:
- <1-65535> access-list number
<txt> access-list6 name
allowed: local -a params
- params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list;
- /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
echo -n ${params[@]##*/}
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \
-"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: access-list $VAR(@) doesn't exist"
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" "; \
+"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) export: access-list6 $VAR(@) doesn't exist"
commit:expression: $VAR(../../prefix-list/export/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $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 ed8084d0..fa476c1b 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
@@ -1,12 +1,10 @@
type: txt
help: Set an access-list to filter incoming route updates from this peer-group
comp_help: possible completions:
- <1-65535> access-list number
<txt> access-list6 name
allowed: local -a params
- params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list;
- /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list6 )
echo -n ${params[@]##*/}
-commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\
-"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: access-list $VAR(@) doesn't exist"
+commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list6 $VAR(@)\" ";\
+"protocols bgp $VAR(../../../../../@) peer-group $VAR(../../../../@) import: access-list6 $VAR(@) doesn't exist"
commit:expression: $VAR(../../prefix-list/import/) == ""; "protocols bgp $VAR(../../../../../@) peer-group $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/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 e3ecb9dd..e6292566 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,2 +1,2 @@
help: Set peer-group as a route reflector client
-commit:expression: $VAR(../../@) == $VAR(../remote-as/@); "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) route-reflector-client: remote-as must equal local-as"
+commit:expression: $VAR(../../../../@) == $VAR(../../../remote-as/@); "protocols bgp $VAR(../../../../@) peer-group $VAR(../../../@) route-reflector-client: remote-as must equal local-as"
diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def
index 7dbad897..8c75e619 100644
--- a/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def
+++ b/templates/protocols/bgp/node.tag/peer-group/node.tag/disable-send-community/node.def
@@ -1,2 +1,2 @@
help: Set to not send community attributes to this peer-group
-commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $(../../@) peer-group $(../@): you must specify the type of community"
+commit:expression: ($VAR(./extended/) != "") || ($VAR(./standard/) != ""); "protocols bgp $VAR(../../@) peer-group $VAR(../@): you must specify the type of community"
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 8aa19846..04e1bd85 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
@@ -2,10 +2,8 @@ type: txt
help: Set an access-list to filter outgoing route updates to this peer-group
comp_help: possible completions:
<1-65535> access-list number
- <txt> access-list6 name
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/access-list/*
- /opt/vyatta/config/active/policy/access-list6/* )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list )
echo -n ${params[@]##*/}
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" "; \
"protocols bgp $VAR(../../../@) peer-group $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 6b809d4a..946a0517 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
@@ -2,10 +2,8 @@ type: txt
help: Set an access-list to filter incoming route updates from this peer-group
comp_help: possible completions:
<1-65535> access-list number
- <txt> access-list6 name
allowed: local -a params
- params=( /opt/vyatta/config/active/policy/access-list/*
- /opt/vyatta/config/active/policy/access-list6/* )
+ params=$( /opt/vyatta/sbin/vyatta-policy.pl --list-policy access-list )
echo -n ${params[@]##*/}
commit:expression: exec "/opt/vyatta/sbin/vyatta_quagga_utils.pl --exists \"policy access-list $VAR(@)\" ";\
"protocols bgp $VAR(../../../@) peer-group $VAR(../../@) import: access-list $VAR(@) doesn't exist"
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 597e9a3b..f8982c0f 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,3 +2,4 @@ type: u32
help: Set the maximum number of prefixes to accept from this peer-group
comp_help: possible completions:
<1-4294967295> prefix limit
+syntax:expression: $VAR(@) >= 1 && $VAR(@) <= 4294967295; "maximum-prefix must be between 1 and 4294967295"
diff --git a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def b/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def
deleted file mode 100644
index e236028f..00000000
--- a/templates/protocols/bgp/node.tag/peer-group/node.tag/timers/connect/node.def
+++ /dev/null
@@ -1,5 +0,0 @@
-type: u32
-help: Set the BGP connect timer for this peer-group
-comp_help: \1 <1-65535>\tconnect timer in seconds
- 0\t\tdisable connect timer
-syntax:expression: $VAR(@) >=0 && $VAR(@) <= 65535; "BGP connect timer must be between 0 and 65535"