diff options
author | paul <paul> | 2003-06-19 01:41:37 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-19 01:41:37 +0000 |
commit | 43133b78a9244352099c7b9073893fc689daf691 (patch) | |
tree | de3fcf76c8fd4ad9e1550be85207665272c80d9f /zebra/zebra_rib.c | |
parent | 3ad9f528fc4ee984d7990c6d6b2c549fe8b92620 (diff) | |
download | quagga-43133b78a9244352099c7b9073893fc689daf691.tar.bz2 quagga-43133b78a9244352099c7b9073893fc689daf691.tar.xz |
2003-06-19 Vladimir Ivaschenko <hazard@francoudi.com>
* zebra/rt_netlink.c: Debug statements added to
netlink_route_multipath()
* zebra/zebra_rib.c: If route has a gateway, delete only existing
route with that specified gateway.
Diffstat (limited to 'zebra/zebra_rib.c')
-rw-r--r-- | zebra/zebra_rib.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c index 2209364c..09d2da5b 100644 --- a/zebra/zebra_rib.c +++ b/zebra/zebra_rib.c @@ -1146,6 +1146,13 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, /* Apply mask. */ apply_mask_ipv4 (p); + if (IS_ZEBRA_DEBUG_KERNEL && gate) + zlog_info ("rib_delete_ipv4(): route delete %s/%d via %s ifindex %d", + inet_ntop (AF_INET, &p->prefix, buf1, BUFSIZ), + p->prefixlen, + inet_ntoa (*gate), + ifindex); + /* Lookup route node. */ rn = route_node_lookup (table, (struct prefix *) p); if (! rn) @@ -1192,6 +1199,20 @@ rib_delete_ipv4 (int type, int flags, struct prefix_ipv4 *p, break; } } + else if (gate) + { + nexthop = rib->nexthop; + + /* Make sure that the route found has the same gateway. */ + if (rib->type == type + && nexthop && + (IPV4_ADDR_SAME (&nexthop->gate.ipv4, gate) || + IPV4_ADDR_SAME (&nexthop->rgate.ipv4, gate)) ) + { + same = rib; + break; + } + } else { if (rib->type == type) |