summaryrefslogtreecommitdiff
path: root/zebra/rt_socket.c
diff options
context:
space:
mode:
authorpaul <paul>2003-05-25 21:35:06 +0000
committerpaul <paul>2003-05-25 21:35:06 +0000
commit595db7f16506d2c82a3478e9f8dab00c8733d386 (patch)
tree240d477dd4b5262ba78cc50fda4b81de09e2c91c /zebra/rt_socket.c
parent726f9b2bbdd5a607f7b0a10a64547739b807e361 (diff)
Add back support for null0 interface blackhole routes.
Diffstat (limited to 'zebra/rt_socket.c')
-rw-r--r--zebra/rt_socket.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index cd2f26ca..19b2fc2f 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -129,7 +129,14 @@ kernel_rtm_ipv4 (int cmd, struct prefix *p, struct rib *rib, int family)
|| nexthop->type == NEXTHOP_TYPE_IFNAME
|| nexthop->type == NEXTHOP_TYPE_IPV4_IFINDEX)
ifindex = nexthop->ifindex;
- }
+ if (nexthop->type == NEXTHOP_TYPE_BLACKHOLE)
+ {
+ struct in_addr loopback;
+ loopback.s_addr = htonl (INADDR_LOOPBACK);
+ sin_gate.sin_addr = loopback;
+ gate = 1;
+ }
+ }
if (cmd == RTM_ADD)
SET_FLAG (nexthop->flags, NEXTHOP_FLAG_FIB);