summaryrefslogtreecommitdiff
path: root/lib/zclient.c
diff options
context:
space:
mode:
Diffstat (limited to 'lib/zclient.c')
-rw-r--r--lib/zclient.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/lib/zclient.c b/lib/zclient.c
index 9db1dd74f2..3e26cd9e6c 100644
--- a/lib/zclient.c
+++ b/lib/zclient.c
@@ -414,6 +414,9 @@ void zclient_send_reg_requests(struct zclient *zclient, vrf_id_t vrf_id)
/* We need router-id information. */
zebra_message_send(zclient, ZEBRA_ROUTER_ID_ADD, vrf_id);
+ /* We need interface information. */
+ zebra_message_send(zclient, ZEBRA_INTERFACE_ADD, vrf_id);
+
/* Set unwanted redistribute route. */
for (afi = AFI_IP; afi < AFI_MAX; afi++)
vrf_bitmap_set(zclient->redist[afi][zclient->redist_default],
@@ -478,6 +481,8 @@ void zclient_send_dereg_requests(struct zclient *zclient, vrf_id_t vrf_id)
/* We need router-id information. */
zebra_message_send(zclient, ZEBRA_ROUTER_ID_DELETE, vrf_id);
+ zebra_message_send(zclient, ZEBRA_INTERFACE_DELETE, vrf_id);
+
/* Set unwanted redistribute route. */
for (afi = AFI_IP; afi < AFI_MAX; afi++)
vrf_bitmap_unset(zclient->redist[afi][zclient->redist_default],
@@ -629,7 +634,7 @@ void zclient_init(struct zclient *zclient, int redist_default,
}
if (zclient_debug)
- zlog_debug("zclient_start is called");
+ zlog_debug("scheduling zclient connection");
zclient_event(ZCLIENT_SCHEDULE, zclient);
}
@@ -2504,8 +2509,9 @@ static int zclient_read(struct thread *thread)
length -= ZEBRA_HEADER_SIZE;
if (zclient_debug)
- zlog_debug("zclient 0x%p command 0x%x VRF %u\n",
- (void *)zclient, command, vrf_id);
+ zlog_debug("zclient 0x%p command %s VRF %u",
+ (void *)zclient, zserv_command_string(command),
+ vrf_id);
switch (command) {
case ZEBRA_CAPABILITIES:
@@ -2574,14 +2580,14 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_NEXTHOP_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd nexthop update\n");
+ zlog_debug("zclient rcvd nexthop update");
if (zclient->nexthop_update)
(*zclient->nexthop_update)(command, zclient, length,
vrf_id);
break;
case ZEBRA_IMPORT_CHECK_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd import check update\n");
+ zlog_debug("zclient rcvd import check update");
if (zclient->import_check_update)
(*zclient->import_check_update)(command, zclient,
length, vrf_id);
@@ -2608,7 +2614,7 @@ static int zclient_read(struct thread *thread)
break;
case ZEBRA_FEC_UPDATE:
if (zclient_debug)
- zlog_debug("zclient rcvd fec update\n");
+ zlog_debug("zclient rcvd fec update");
if (zclient->fec_update)
(*zclient->fec_update)(command, zclient, length);
break;