From cf245afd5dd1f8c7c80089465e610acaaa1e2f24 Mon Sep 17 00:00:00 2001 From: David Lamparter Date: Fri, 5 Feb 2010 04:31:56 +0100 Subject: zebra: cleanup blackhole support blackhole support was horribly broken. cleanup by removing blackhole stuff from ZEBRA_FLAG_*, instead add a "zflags" field inside struct rib. introduces support for "prohibit" routes (Linux/netlink only) also clean up blackhole options on "ip route" vty commands. --- zebra/rt_socket.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'zebra/rt_socket.c') diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c index 1b8ded7e..4fadc7e9 100644 --- a/zebra/rt_socket.c +++ b/zebra/rt_socket.c @@ -163,7 +163,7 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family) (union sockunion *)mask, gate ? (union sockunion *)&sin_gate : NULL, ifindex, - rib->flags, + rib->flags | (rib->zflags << 8), rib->metric); if (IS_ZEBRA_DEBUG_RIB) @@ -286,7 +286,8 @@ sin6_masklen (struct in6_addr mask) return len; } -/* Interface between zebra message and rtm message. */ +/* Interface between zebra message and rtm message. + * only called by kernel_delete_ipv6_old by rib_bogus_ipv6 */ static int kernel_rtm_ipv6 (int message, struct prefix_ipv6 *dest, struct in6_addr *gate, int index, int flags) @@ -453,7 +454,7 @@ kernel_rtm_ipv6_multipath (int cmd, struct prefix *p, struct rib *rib, (union sockunion *) mask, gate ? (union sockunion *)&sin_gate : NULL, ifindex, - rib->flags, + rib->flags | (rib->zflags << 8), rib->metric); #if 0 -- cgit v1.2.3