diff options
author | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-21 16:56:09 -0700 |
---|---|---|
committer | Stephen Hemminger <stephen.hemminger@vyatta.com> | 2009-05-21 16:56:09 -0700 |
commit | 562e34a944fa4610931f713ee862d0de3c93161a (patch) | |
tree | 4d583a729b4eff2708038f7d0589b5126ae7f0f0 /templates | |
parent | bf3b5492e4e36fdccdad9e6651839b33f92ff955 (diff) | |
download | vyatta-cfg-quagga-562e34a944fa4610931f713ee862d0de3c93161a.tar.gz vyatta-cfg-quagga-562e34a944fa4610931f713ee862d0de3c93161a.zip |
Allow interface as BGP source
Bug 4391
Quagga allows IP address or interface as update source, so generalize
existing template.
Diffstat (limited to 'templates')
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def index e631951d..9a7b9c09 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/update-source/node.def @@ -1,11 +1,9 @@ -type: ipv4 +type: txt help: Set the source IP of routing updates -comp_help: \1 <x.x.x.x>\tIP address of route source -syntax:expression: exec " \ - if [ -z \"`ip addr | grep $VAR(@) `\" ]; then \ - echo $VAR(@) doesn\\'t exist on this system ; \ - exit 1 ; \ - fi ; " +comp_help: + <x.x.x.x> Set IP address of route source + <interface> Set interface as route source +syntax: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(../@)" update: if [ -n "$VAR(../remote-as/@)" ]; then peer="remote-as $VAR(../remote-as/@)"; @@ -15,5 +13,6 @@ update: if [ -n "$VAR(../remote-as/@)" ]; then vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../@)" \ -c "neighbor $VAR(../@) $peer" \ -c "neighbor $VAR(../@) update-source $VAR(@)" -delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../@)" \ +delete: vyatta-vtysh --noerror -c "configure terminal" \ + -c "router bgp $VAR(../../@)" \ -c "no neighbor $VAR(../@) update-source" |