From 0d9dcd7374f5b9dcb4ca69f32753c28051e9952d Mon Sep 17 00:00:00 2001 From: Bob Gilligan Date: Thu, 11 Aug 2011 18:13:11 -0700 Subject: Bugfix 7077: Add support for IPv6 nexthops in route maps From patch written by: daniil.baturin@vyatta.com (cherry picked from commit 9e58fc07244553bd711c2d7a9b9b5c64ffeb550d) --- .../rule/node.tag/set/ipv6-next-hop/global/node.def | 14 ++++++++++++++ .../rule/node.tag/set/ipv6-next-hop/local/node.def | 14 ++++++++++++++ .../node.tag/rule/node.tag/set/ipv6-next-hop/node.def | 2 ++ 3 files changed, 30 insertions(+) create mode 100644 templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def create mode 100644 templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def create mode 100644 templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def (limited to 'templates/policy') diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def new file mode 100644 index 00000000..9d52bf4f --- /dev/null +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/global/node.def @@ -0,0 +1,14 @@ +type: ipv6 +help: Nexthop IPv6 global address +val_help: IPv6 address + +# TODO: can also set to peer for BGP +commit:expression: $VAR(../../../action/) != ""; "you must specify an action" + +update: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \ + -c "set ipv6 next-hop global $VAR(@)" + +delete: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \ + -c "no set ipv6 next-hop global" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def new file mode 100644 index 00000000..34eaccfc --- /dev/null +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/local/node.def @@ -0,0 +1,14 @@ +type: ipv6 +help: Nexthop IPv6 local address +val_help: IPv6 address + +# TODO: can also set to peer for BGP +commit:expression: $VAR(../../../action/) != ""; "you must specify an action" + +update: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \ + -c "set ipv6 next-hop local $VAR(@)" + +delete: vtysh -c "configure terminal" \ + -c "route-map $VAR(../../../../@) $VAR(../../../action/@) $VAR(../../../@)" \ + -c "no set ipv6 next-hop local" diff --git a/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def new file mode 100644 index 00000000..77f54b4d --- /dev/null +++ b/templates/policy/route-map/node.tag/rule/node.tag/set/ipv6-next-hop/node.def @@ -0,0 +1,2 @@ +help: Nexthop IPv6 address + -- cgit v1.2.3