summaryrefslogtreecommitdiffstats
path: root/ospfd/ospf_asbr.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 02:46:33 +0200
committerDonald Sharp <sharpd@cumulusnetworks.com>2015-05-20 02:46:33 +0200
commit0d9551dc3c53f2d46e3c0e3ecb4e4b0eb327179e (patch)
treef8bf3ba86e81b823af3fcb6fcf1f4fbe77c0b167 /ospfd/ospf_asbr.c
parentbgpd-fix-nexthop-show.patch (diff)
downloadfrr-0d9551dc3c53f2d46e3c0e3ecb4e4b0eb327179e.tar.xz
frr-0d9551dc3c53f2d46e3c0e3ecb4e4b0eb327179e.zip
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>
Diffstat (limited to 'ospfd/ospf_asbr.c')
-rw-r--r--ospfd/ospf_asbr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/ospfd/ospf_asbr.c b/ospfd/ospf_asbr.c
index dbf7f11f5..f4140b858 100644
--- a/ospfd/ospf_asbr.c
+++ b/ospfd/ospf_asbr.c
@@ -135,7 +135,8 @@ ospf_route_map_set_compare (struct route_map_set_values *values1,
/* Add an External info for AS-external-LSA. */
struct external_info *
ospf_external_info_add (u_char type, struct prefix_ipv4 p,
- unsigned int ifindex, struct in_addr nexthop)
+ unsigned int ifindex, struct in_addr nexthop,
+ u_short tag)
{
struct external_info *new;
struct route_node *rn;
@@ -162,7 +163,7 @@ ospf_external_info_add (u_char type, struct prefix_ipv4 p,
new->p = p;
new->ifindex = ifindex;
new->nexthop = nexthop;
- new->tag = 0;
+ new->tag = tag;
if (rn)
rn->info = new;