diff options
author | David Lamparter <equinox@diac24.net> | 2010-02-05 05:54:47 +0100 |
---|---|---|
committer | David Lamparter <equinox@diac24.net> | 2010-02-05 06:05:14 +0100 |
commit | 647e8e064d8e5316fc89587714a056b1240fa298 (patch) | |
tree | 07106ad92e69062d7b4c8e616548b6ec7497aabc /zebra/zebra_rib.c | |
parent | 659811a522cda0c95e83bfdde41b970442b1fbd3 (diff) | |
download | quagga-647e8e064d8e5316fc89587714a056b1240fa298.tar.bz2 quagga-647e8e064d8e5316fc89587714a056b1240fa298.tar.xz |
zebra: rib: support blackhole kernel deletion notification
properly receive the deletion notify for blackhole routes and mark the
rib entry.
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r-- | zebra/zebra_rib.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index fc9c6aa2..50a19477 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1837,6 +1837,7 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, struct nexthop *nexthop; char buf1[INET_ADDRSTRLEN]; char buf2[INET_ADDRSTRLEN]; + unsigned discard = RIB_ZF_BLACKHOLE_FLAGS (flags >> 8); /* Lookup table. */ table = vrf_table (AFI_IP, SAFI_UNICAST, 0); @@ -1893,6 +1894,11 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, if (rib->type != type) continue; + if (rib->zflags == discard) + { + same = rib; + break; + } if (gate) { for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) @@ -2414,6 +2420,7 @@ rib_delete_ipv6 (int type, int flags, struct prefix_ipv6 *p, struct nexthop *nexthop; char buf1[INET6_ADDRSTRLEN]; char buf2[INET6_ADDRSTRLEN]; + unsigned discard = RIB_ZF_BLACKHOLE_FLAGS (flags >> 8); /* Apply mask. */ apply_mask_ipv6 (p); @@ -2456,6 +2463,11 @@ rib_delete_ipv6 (int type, int flags, struct prefix_ipv6 *p, if (rib->type != type) continue; + if (rib->zflags == discard) + { + same = rib; + break; + } if (gate) { for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) |