]> git.proxmox.com Git - mirror_frr.git/commit - lib/zclient.c
Add support for route tags
authorDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:46:33 +0000 (17:46 -0700)
committerDonald Sharp <sharpd@cumulusnetworks.com>
Wed, 20 May 2015 00:46:33 +0000 (17:46 -0700)
commit0d9551dc3c53f2d46e3c0e3ecb4e4b0eb327179e
treef8bf3ba86e81b823af3fcb6fcf1f4fbe77c0b167
parent77217fd428a3d647dafbb4f981bb02e281b30b97
Add support for route tags

Credit
------
A huge amount of credit for this patch goes to Piotr Chytla for
their 'route tags support' patch that was submitted to quagga-dev
in June 2007.

Documentation
-------------
All ipv4 and ipv6 static route commands now have a "tag" option
which allows the user to set a tag between 1 and 65535.

quagga(config)# ip route 1.1.1.1/32 10.1.1.1 tag ?
  <1-65535>  Tag value
quagga(config)# ip route 1.1.1.1/32 10.1.1.1 tag 40
quagga(config)#

quagga# show ip route 1.1.1.1/32
Routing entry for 1.1.1.1/32
  Known via "static", distance 1, metric 0, tag 40, best
  * 10.1.1.1, via swp1

quagga#

The route-map parser supports matching on tags and setting tags
!
route-map MATCH_TAG_18 permit 10
 match tag 18
!

!
route-map SET_TAG_22 permit 10
 set tag 22
!

BGP and OSPF support:
- matching on tags when redistribing routes from the RIB into BGP/OSPF.
- setting tags when redistribing routes from the RIB into BGP/OSPF.

BGP also supports setting a tag via a table-map, when installing BGP
routes into the RIB.

Signed-off-by: Daniel Walton <dwalton@cumulusnetworks.com>
21 files changed:
bgpd/bgp_attr.c
bgpd/bgp_attr.h
bgpd/bgp_route.c
bgpd/bgp_route.h
bgpd/bgp_routemap.c
bgpd/bgp_zebra.c
lib/zclient.c
lib/zclient.h
ospfd/ospf_asbr.c
ospfd/ospf_asbr.h
ospfd/ospf_lsa.c
ospfd/ospf_routemap.c
ospfd/ospf_zebra.c
ospfd/ospfd.c
ospfd/ospfd.h
ripd/rip_routemap.c
ripngd/ripng_routemap.c
zebra/rib.h
zebra/zebra_rib.c
zebra/zebra_vty.c
zebra/zserv.c