zebra: Fix compile warnings under freebsd

Compiling under clang we see compiler warnings
Fix them.

Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
Donald Sharp 2017-01-18 10:17:20 -05:00
parent 7936827a85
commit 9bf7536273
3 changed files with 9 additions and 6 deletions

View File

@ -927,7 +927,7 @@ rtm_read (struct rt_msghdr *rtm)
int ret;
if (! IS_ZEBRA_DEBUG_RIB)
return;
ret = rib_lookup_ipv4_route (&p, &gate, VRF_DEFAULT);
ret = rib_lookup_ipv4_route ((struct prefix_ipv4 *)&p, &gate, VRF_DEFAULT);
prefix2str (&p, buf, sizeof(buf));
switch (rtm->rtm_type)
{
@ -951,7 +951,7 @@ rtm_read (struct rt_msghdr *rtm)
case ZEBRA_RIB_FOUND_EXACT: /* RIB RR == FIB RR */
zlog_debug ("%s: %s %s: done Ok",
__func__, lookup (rtm_type_str, rtm->rtm_type), buf);
rib_lookup_and_dump (&p, VRF_DEFAULT);
rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT);
return;
break;
}
@ -964,18 +964,18 @@ rtm_read (struct rt_msghdr *rtm)
case ZEBRA_RIB_FOUND_EXACT:
zlog_debug ("%s: %s %s: desync: RR is still in RIB, while already not in FIB",
__func__, lookup (rtm_type_str, rtm->rtm_type), buf);
rib_lookup_and_dump (&p, VRF_DEFAULT);
rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT);
break;
case ZEBRA_RIB_FOUND_CONNECTED:
case ZEBRA_RIB_FOUND_NOGATE:
zlog_debug ("%s: %s %s: desync: RR is still in RIB, plus gate differs",
__func__, lookup (rtm_type_str, rtm->rtm_type), buf);
rib_lookup_and_dump (&p, VRF_DEFAULT);
rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT);
break;
case ZEBRA_RIB_NOTFOUND: /* RIB RR == FIB RR */
zlog_debug ("%s: %s %s: done Ok",
__func__, lookup (rtm_type_str, rtm->rtm_type), buf);
rib_lookup_and_dump (&p, VRF_DEFAULT);
rib_lookup_and_dump ((struct prefix_ipv4 *)&p, VRF_DEFAULT);
return;
break;
}

View File

@ -883,7 +883,9 @@ zfpm_encode_route (rib_dest_t *dest, struct rib *rib, char *in_buf,
size_t in_buf_len, fpm_msg_type_e *msg_type)
{
size_t len;
#ifdef HAVE_NETLINK
int cmd;
#endif
len = 0;
*msg_type = FPM_MSG_TYPE_NONE;

View File

@ -2386,7 +2386,7 @@ zebra_find_client (u_char proto)
return NULL;
}
#ifdef HAVE_NETLINK
/* Display default rtm_table for all clients. */
DEFUN (show_table,
show_table_cmd,
@ -2419,6 +2419,7 @@ DEFUN (no_config_table,
zebrad.rtm_table_default = 0;
return CMD_SUCCESS;
}
#endif
DEFUN (ip_forwarding,
ip_forwarding_cmd,