diff options
-rw-r--r-- | templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def | 34 |
1 files changed, 28 insertions, 6 deletions
diff --git a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def index 4f14a62b..841f4e57 100644 --- a/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def +++ b/templates/protocols/bgp/node.tag/neighbor/node.tag/soft-reconfiguration/inbound/node.def @@ -1,12 +1,34 @@ help: Set inbound soft reconfiguration for 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-as \ + --as $VAR(../../@) --neighbor $VAR(../@)" + update: if [ -n "$VAR(../../remote-as/@)" ]; then peer="remote-as $VAR(../../remote-as/@)"; else peer="peer-group $VAR(../../peer-group/@)"; fi; - vyatta-vtysh -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "neighbor $VAR(../../@) $peer" \ - -c "neighbor $VAR(../../@) soft-reconfiguration inbound" -delete: vyatta-vtysh --noerror -c "configure terminal" -c "router bgp $VAR(../../../@)" \ - -c "no neighbor $VAR(../../@) soft-reconfiguration inbound" + if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) + then + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "neighbor $VAR(../../@) $peer" \ + -c "address-family ipv6" \ + -c "neighbor $VAR(../../@) soft-reconfiguration inbound"; + else + vyatta-vtysh -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "neighbor $VAR(../../@) $peer" \ + -c "neighbor $VAR(../../@) soft-reconfiguration inbound"; + fi; + +delete: if /opt/vyatta/sbin/vyatta-validate-type.pl -q ipv6 $VAR(../../@) + then + vyatta-vtysh -n -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "address-family ipv6" \ + -c "no neighbor $VAR(../../@) soft-reconfiguration inbound"; + else + vyatta-vtysh -n -c "configure terminal" \ + -c "router bgp $VAR(../../../@)" \ + -c "no neighbor $VAR(../../@) soft-reconfiguration inbound"; + fi; |