diff options
Diffstat (limited to 'zebra/zebra_ptm.c')
| -rw-r--r-- | zebra/zebra_ptm.c | 24 |
1 files changed, 4 insertions, 20 deletions
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c index c5223199a4..194833f1e9 100644 --- a/zebra/zebra_ptm.c +++ b/zebra/zebra_ptm.c @@ -714,13 +714,11 @@ zebra_ptm_bfd_dst_register (struct zserv *client, int sock, u_short length, inet_ntop(AF_INET, &dst_p.u.prefix4, buf, sizeof(buf)); ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_DST_IP_FIELD, buf); } -#ifdef HAVE_IPV6 else { inet_ntop(AF_INET6, &dst_p.u.prefix6, buf, sizeof(buf)); ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_DST_IP_FIELD, buf); } -#endif /* HAVE_IPV6 */ min_rx_timer = stream_getl(s); sprintf(tmp_buf, "%d", min_rx_timer); @@ -755,14 +753,12 @@ zebra_ptm_bfd_dst_register (struct zserv *client, int sock, u_short length, ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } -#ifdef HAVE_IPV6 else { inet_ntop(AF_INET6, &src_p.u.prefix6, buf, sizeof(buf)); ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } -#endif /* HAVE_IPV6 */ multi_hop_cnt = stream_getc(s); sprintf(tmp_buf, "%d", multi_hop_cnt); @@ -775,7 +771,6 @@ zebra_ptm_bfd_dst_register (struct zserv *client, int sock, u_short length, } else { -#ifdef HAVE_IPV6 if (dst_p.family == AF_INET6) { src_p.family = stream_getw(s); @@ -799,7 +794,6 @@ zebra_ptm_bfd_dst_register (struct zserv *client, int sock, u_short length, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } } -#endif /* HAVE_IPV6 */ len = stream_getc(s); stream_get(if_name, s, len); if_name[len] = '\0'; @@ -875,17 +869,11 @@ zebra_ptm_bfd_dst_deregister (struct zserv *client, int sock, u_short length, stream_get(&dst_p.u.prefix, s, dst_p.prefixlen); if (dst_p.family == AF_INET) - { - inet_ntop(AF_INET, &dst_p.u.prefix4, buf, sizeof(buf)); - ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_DST_IP_FIELD, buf); - } -#ifdef HAVE_IPV6 + inet_ntop(AF_INET, &dst_p.u.prefix4, buf, sizeof(buf)); else - { - inet_ntop(AF_INET6, &dst_p.u.prefix6, buf, sizeof(buf)); - ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_DST_IP_FIELD, buf); - } -#endif /* HAVE_IPV6 */ + inet_ntop(AF_INET6, &dst_p.u.prefix6, buf, sizeof(buf)); + ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_DST_IP_FIELD, buf); + multi_hop = stream_getc(s); if (multi_hop) @@ -908,21 +896,18 @@ zebra_ptm_bfd_dst_deregister (struct zserv *client, int sock, u_short length, ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } -#ifdef HAVE_IPV6 else { inet_ntop(AF_INET6, &src_p.u.prefix6, buf, sizeof(buf)); ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } -#endif /* HAVE_IPV6 */ if (zvrf_id (zvrf) != VRF_DEFAULT) ptm_lib_append_msg(ptm_hdl, out_ctxt, ZEBRA_PTM_BFD_VRF_NAME_FIELD, zvrf_name (zvrf)); } else { -#ifdef HAVE_IPV6 if (dst_p.family == AF_INET6) { src_p.family = stream_getw(s); @@ -946,7 +931,6 @@ zebra_ptm_bfd_dst_deregister (struct zserv *client, int sock, u_short length, ZEBRA_PTM_BFD_SRC_IP_FIELD, buf); } } -#endif /* HAVE_IPV6 */ len = stream_getc(s); stream_get(if_name, s, len); |
