diff options
author | paul <paul> | 2003-06-19 01:41:37 +0000 |
---|---|---|
committer | paul <paul> | 2003-06-19 01:41:37 +0000 |
commit | 5ec90d28c9268c54e000c2bcfb9b164abfacbacd (patch) | |
tree | ab5d297f68b94182647d043d790ffab4a2b44c93 /zebra/rt_netlink.c | |
parent | dd488a78add05f10f58f4096dca622c6b5f1f0c9 (diff) |
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/rt_netlink.c')
-rw-r--r-- | zebra/rt_netlink.c | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c index 6a3df192..b38df20b 100644 --- a/zebra/rt_netlink.c +++ b/zebra/rt_netlink.c @@ -1323,13 +1323,24 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib, { for (nexthop = rib->nexthop; nexthop; nexthop = nexthop->next) { + if ((cmd == RTM_NEWROUTE && CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_ACTIVE)) || (cmd == RTM_DELROUTE && CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB))) { + if (CHECK_FLAG (nexthop->flags, NEXTHOP_FLAG_RECURSIVE)) { + if (IS_ZEBRA_DEBUG_KERNEL) { + zlog_info ("netlink_route_multipath(): %s %s/%d via %s if %u", + lookup (nlmsg_str, cmd), + inet_ntoa (p->u.prefix4), + p->prefixlen, + inet_ntoa (nexthop->rgate.ipv4), + nexthop->rifindex); + } + if (nexthop->rtype == NEXTHOP_TYPE_IPV4 || nexthop->rtype == NEXTHOP_TYPE_IPV4_IFINDEX) addattr_l (&req.n, sizeof req, RTA_GATEWAY, @@ -1351,6 +1362,15 @@ netlink_route_multipath (int cmd, struct prefix *p, struct rib *rib, } else { + if (IS_ZEBRA_DEBUG_KERNEL) { + zlog_info ("netlink_route_multipath(): %s %s/%d via %s if %u", + lookup (nlmsg_str, cmd), + inet_ntoa (p->u.prefix4), + p->prefixlen, + inet_ntoa (nexthop->gate.ipv4), + nexthop->ifindex); + } + if (nexthop->type == NEXTHOP_TYPE_IPV4 || nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX) addattr_l (&req.n, sizeof req, RTA_GATEWAY, |