summaryrefslogtreecommitdiff
path: root/zebra/kernel_socket.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/kernel_socket.c')
-rw-r--r--zebra/kernel_socket.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index a47f4f63..1e915d1d 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -148,6 +148,7 @@ rtm_flag_dump (int flag)
struct message *mes;
static char buf[BUFSIZ];
+ buf[0] = '0';
for (mes = rtm_flag_str; mes->key != 0; mes++)
{
if (mes->key & flag)
@@ -476,6 +477,12 @@ rtm_read (struct rt_msghdr *rtm)
if (flags & RTF_STATIC)
SET_FLAG (zebra_flags, ZEBRA_FLAG_STATIC);
+ /* This is a reject or blackhole route */
+ if (flags & RTF_REJECT)
+ SET_FLAG (zebra_flags, ZEBRA_FLAG_REJECT);
+ if (flags & RTF_BLACKHOLE)
+ SET_FLAG (zebra_flags, ZEBRA_FLAG_BLACKHOLE);
+
if (dest.sa.sa_family == AF_INET)
{
struct prefix_ipv4 p;
@@ -619,6 +626,9 @@ rtm_write (int message,
/* Additional flags. */
if (zebra_flags & ZEBRA_FLAG_BLACKHOLE)
msg.rtm.rtm_flags |= RTF_BLACKHOLE;
+ if (zebra_flags & ZEBRA_FLAG_REJECT)
+ msg.rtm.rtm_flags |= RTF_REJECT;
+
#ifdef HAVE_SIN_LEN
#define SOCKADDRSET(X,R) \