diff options
Diffstat (limited to 'bgpd/bgp_flowspec_util.c')
| -rw-r--r-- | bgpd/bgp_flowspec_util.c | 25 |
1 files changed, 16 insertions, 9 deletions
diff --git a/bgpd/bgp_flowspec_util.c b/bgpd/bgp_flowspec_util.c index 6408337a5f..9f92a3c3a6 100644 --- a/bgpd/bgp_flowspec_util.c +++ b/bgpd/bgp_flowspec_util.c @@ -21,11 +21,13 @@ #include "zebra.h" #include "prefix.h" +#include "lib_errors.h" #include "bgp_table.h" #include "bgp_flowspec_util.h" #include "bgp_flowspec_private.h" #include "bgp_pbr.h" +#include "bgp_errors.h" static void hex2bin(uint8_t *hex, int *bin) { @@ -66,8 +68,9 @@ static int bgp_flowspec_call_non_opaque_decode(uint8_t *nlri_content, int len, len, mval, error); if (*error < 0) - zlog_err("%s: flowspec_op_decode error %d", - __func__, *error); + flog_err(BGP_ERR_FLOWSPEC_PACKET, + "%s: flowspec_op_decode error %d", + __func__, *error); else *match_num = *error; return ret; @@ -444,8 +447,9 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len, len - offset, prefix, &error); if (error < 0) - zlog_err("%s: flowspec_ip_address error %d", - __func__, error); + flog_err(BGP_ERR_FLOWSPEC_PACKET, + "%s: flowspec_ip_address error %d", + __func__, error); else bpem->match_bitmask |= bitmask; offset += ret; @@ -538,8 +542,9 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len, len - offset, &bpem->tcpflags, &error); if (error < 0) - zlog_err("%s: flowspec_tcpflags_decode error %d", - __func__, error); + flog_err(BGP_ERR_FLOWSPEC_PACKET, + "%s: flowspec_tcpflags_decode error %d", + __func__, error); else bpem->match_tcpflags_num = error; /* contains the number of slots used */ @@ -552,14 +557,16 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len, len - offset, &bpem->fragment, &error); if (error < 0) - zlog_err("%s: flowspec_fragment_type_decode error %d", - __func__, error); + flog_err(BGP_ERR_FLOWSPEC_PACKET, + "%s: flowspec_fragment_type_decode error %d", + __func__, error); else bpem->match_fragment_num = error; offset += ret; break; default: - zlog_err("%s: unknown type %d\n", __func__, type); + flog_err(LIB_ERR_DEVELOPMENT, "%s: unknown type %d\n", + __func__, type); } } return error; |
