*: style for EC replacements

Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
This commit is contained in:
Quentin Young 2018-09-13 19:38:57 +00:00
parent 450971aa99
commit 1c50c1c0d6
84 changed files with 547 additions and 571 deletions

View File

@ -997,14 +997,13 @@ bgp_attr_flags_diagnose(struct bgp_attr_parser_args *args,
for (i = 0; i <= 2; i++) /* O,T,P, but not E */
if (CHECK_FLAG(desired_flags, attr_flag_str[i].key)
!= CHECK_FLAG(real_flags, attr_flag_str[i].key)) {
flog_err(
EC_BGP_ATTR_FLAG,
"%s attribute must%s be flagged as \"%s\"",
lookup_msg(attr_str, attr_code, NULL),
CHECK_FLAG(desired_flags, attr_flag_str[i].key)
? ""
: " not",
attr_flag_str[i].str);
flog_err(EC_BGP_ATTR_FLAG,
"%s attribute must%s be flagged as \"%s\"",
lookup_msg(attr_str, attr_code, NULL),
CHECK_FLAG(desired_flags, attr_flag_str[i].key)
? ""
: " not",
attr_flag_str[i].str);
seen = 1;
}
if (!seen) {
@ -1076,17 +1075,17 @@ static int bgp_attr_flag_invalid(struct bgp_attr_parser_args *args)
if (CHECK_FLAG(flags, BGP_ATTR_FLAG_PARTIAL)) {
if (!CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL)) {
flog_err(EC_BGP_ATTR_FLAG,
"%s well-known attribute "
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags);
"%s well-known attribute "
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags);
return 1;
}
if (CHECK_FLAG(flags, BGP_ATTR_FLAG_OPTIONAL)
&& !CHECK_FLAG(flags, BGP_ATTR_FLAG_TRANS)) {
flog_err(EC_BGP_ATTR_FLAG,
"%s optional + transitive attribute "
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags);
"%s optional + transitive attribute "
"must NOT have the partial flag set (%x)",
lookup_msg(attr_str, attr_code, NULL), flags);
return 1;
}
}
@ -1119,7 +1118,7 @@ static bgp_attr_parse_ret_t bgp_attr_origin(struct bgp_attr_parser_args *args)
value). */
if (length != 1) {
flog_err(EC_BGP_ATTR_LEN,
"Origin attribute length is not one %d", length);
"Origin attribute length is not one %d", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
}
@ -1133,7 +1132,7 @@ static bgp_attr_parse_ret_t bgp_attr_origin(struct bgp_attr_parser_args *args)
if ((attr->origin != BGP_ORIGIN_IGP) && (attr->origin != BGP_ORIGIN_EGP)
&& (attr->origin != BGP_ORIGIN_INCOMPLETE)) {
flog_err(EC_BGP_ATTR_ORIGIN,
"Origin attribute value is invalid %d", attr->origin);
"Origin attribute value is invalid %d", attr->origin);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_INVAL_ORIGIN,
args->total);
}
@ -1162,8 +1161,8 @@ static int bgp_attr_aspath(struct bgp_attr_parser_args *args)
/* In case of IBGP, length will be zero. */
if (!attr->aspath) {
flog_err(EC_BGP_ATTR_MAL_AS_PATH,
"Malformed AS path from %s, length is %d", peer->host,
length);
"Malformed AS path from %s, length is %d", peer->host,
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_MAL_AS_PATH,
0);
}
@ -1192,7 +1191,7 @@ static bgp_attr_parse_ret_t bgp_attr_aspath_check(struct peer *const peer,
|| (peer->sort == BGP_PEER_EBGP
&& aspath_confed_check(attr->aspath))) {
flog_err(EC_BGP_ATTR_MAL_AS_PATH, "Malformed AS path from %s",
peer->host);
peer->host);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_AS_PATH);
return BGP_ATTR_PARSE_ERROR;
@ -1203,8 +1202,8 @@ static bgp_attr_parse_ret_t bgp_attr_aspath_check(struct peer *const peer,
if (peer->sort == BGP_PEER_EBGP
&& !aspath_firstas_check(attr->aspath, peer->as)) {
flog_err(EC_BGP_ATTR_FIRST_AS,
"%s incorrect first AS (must be %u)",
peer->host, peer->as);
"%s incorrect first AS (must be %u)",
peer->host, peer->as);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_AS_PATH);
return BGP_ATTR_PARSE_ERROR;
@ -1237,8 +1236,8 @@ static int bgp_attr_as4_path(struct bgp_attr_parser_args *args,
/* In case of IBGP, length will be zero. */
if (!*as4_path) {
flog_err(EC_BGP_ATTR_MAL_AS_PATH,
"Malformed AS4 path from %s, length is %d",
peer->host, length);
"Malformed AS4 path from %s, length is %d", peer->host,
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_MAL_AS_PATH,
0);
}
@ -1261,7 +1260,7 @@ static bgp_attr_parse_ret_t bgp_attr_nexthop(struct bgp_attr_parser_args *args)
/* Check nexthop attribute length. */
if (length != 4) {
flog_err(EC_BGP_ATTR_LEN,
"Nexthop attribute length isn't four [%d]", length);
"Nexthop attribute length isn't four [%d]", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
@ -1306,7 +1305,7 @@ static bgp_attr_parse_ret_t bgp_attr_med(struct bgp_attr_parser_args *args)
/* Length check. */
if (length != 4) {
flog_err(EC_BGP_ATTR_LEN,
"MED attribute length isn't four [%d]", length);
"MED attribute length isn't four [%d]", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
@ -1330,7 +1329,7 @@ bgp_attr_local_pref(struct bgp_attr_parser_args *args)
/* Length check. */
if (length != 4) {
flog_err(EC_BGP_ATTR_LEN,
"LOCAL_PREF attribute length isn't 4 [%u]", length);
"LOCAL_PREF attribute length isn't 4 [%u]", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
}
@ -1360,8 +1359,8 @@ static int bgp_attr_atomic(struct bgp_attr_parser_args *args)
/* Length check. */
if (length != 0) {
flog_err(EC_BGP_ATTR_LEN,
"ATOMIC_AGGREGATE attribute length isn't 0 [%u]",
length);
"ATOMIC_AGGREGATE attribute length isn't 0 [%u]",
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
}
@ -1387,8 +1386,8 @@ static int bgp_attr_aggregator(struct bgp_attr_parser_args *args)
if (length != wantedlen) {
flog_err(EC_BGP_ATTR_LEN,
"AGGREGATOR attribute length isn't %u [%u]",
wantedlen, length);
"AGGREGATOR attribute length isn't %u [%u]", wantedlen,
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
}
@ -1416,8 +1415,8 @@ bgp_attr_as4_aggregator(struct bgp_attr_parser_args *args,
const bgp_size_t length = args->length;
if (length != 8) {
flog_err(EC_BGP_ATTR_LEN,
"New Aggregator length is not 8 [%d]", length);
flog_err(EC_BGP_ATTR_LEN, "New Aggregator length is not 8 [%d]",
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
0);
}
@ -1577,7 +1576,7 @@ bgp_attr_originator_id(struct bgp_attr_parser_args *args)
/* Length check. */
if (length != 4) {
flog_err(EC_BGP_ATTR_LEN, "Bad originator ID length %d",
length);
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
@ -1600,8 +1599,7 @@ bgp_attr_cluster_list(struct bgp_attr_parser_args *args)
/* Check length. */
if (length % 4) {
flog_err(EC_BGP_ATTR_LEN, "Bad cluster list length %d",
length);
flog_err(EC_BGP_ATTR_LEN, "Bad cluster list length %d", length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
@ -2108,8 +2106,8 @@ static bgp_attr_parse_ret_t bgp_attr_psid_sub(int32_t type,
else if (type == BGP_PREFIX_SID_IPV6) {
if (length != BGP_PREFIX_SID_IPV6_LENGTH) {
flog_err(EC_BGP_ATTR_LEN,
"Prefix SID IPv6 length is %d instead of %d",
length, BGP_PREFIX_SID_IPV6_LENGTH);
"Prefix SID IPv6 length is %d instead of %d",
length, BGP_PREFIX_SID_IPV6_LENGTH);
return bgp_attr_malformed(args,
BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
@ -2208,8 +2206,8 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
* can only support that.
*/
if (length < 2) {
flog_err(EC_BGP_ATTR_LEN,
"Bad PMSI tunnel attribute length %d", length);
flog_err(EC_BGP_ATTR_LEN, "Bad PMSI tunnel attribute length %d",
length);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);
}
@ -2217,15 +2215,15 @@ bgp_attr_pmsi_tunnel(struct bgp_attr_parser_args *args)
tnl_type = stream_getc(peer->curr);
if (tnl_type > PMSI_TNLTYPE_MAX) {
flog_err(EC_BGP_ATTR_PMSI_TYPE,
"Invalid PMSI tunnel attribute type %d", tnl_type);
"Invalid PMSI tunnel attribute type %d", tnl_type);
return bgp_attr_malformed(args, BGP_NOTIFY_UPDATE_OPT_ATTR_ERR,
args->total);
}
if (tnl_type == PMSI_TNLTYPE_INGR_REPL) {
if (length != 9) {
flog_err(EC_BGP_ATTR_PMSI_LEN,
"Bad PMSI tunnel attribute length %d for IR",
length);
"Bad PMSI tunnel attribute length %d for IR",
length);
return bgp_attr_malformed(
args, BGP_NOTIFY_UPDATE_ATTR_LENG_ERR,
args->total);

View File

@ -174,7 +174,7 @@ static struct vrf_irt_node *vrf_import_rt_new(struct ecommunity_val *rt)
bgp_def = bgp_get_default();
if (!bgp_def) {
flog_err(EC_BGP_NO_DFLT,
"vrf import rt new - def instance not created yet");
"vrf import rt new - def instance not created yet");
return NULL;
}
@ -205,7 +205,7 @@ static void vrf_import_rt_free(struct vrf_irt_node *irt)
bgp_def = bgp_get_default();
if (!bgp_def) {
flog_err(EC_BGP_NO_DFLT,
"vrf import rt free - def instance not created yet");
"vrf import rt free - def instance not created yet");
return;
}
@ -226,9 +226,8 @@ static struct vrf_irt_node *lookup_vrf_import_rt(struct ecommunity_val *rt)
bgp_def = bgp_get_default();
if (!bgp_def) {
flog_err(
EC_BGP_NO_DFLT,
"vrf import rt lookup - def instance not created yet");
flog_err(EC_BGP_NO_DFLT,
"vrf import rt lookup - def instance not created yet");
return NULL;
}
@ -1389,12 +1388,11 @@ static int update_evpn_type4_route(struct bgp *bgp,
&attr, 1, &ri,
&route_changed);
if (ret != 0) {
flog_err(
EC_BGP_ES_INVALID,
"%u ERROR: Failed to updated ES route ESI: %s VTEP %s",
bgp->vrf_id,
esi_to_str(&p->prefix.es_addr.esi, buf, sizeof(buf)),
ipaddr2str(&es->originator_ip, buf1, sizeof(buf1)));
flog_err(EC_BGP_ES_INVALID,
"%u ERROR: Failed to updated ES route ESI: %s VTEP %s",
bgp->vrf_id,
esi_to_str(&p->prefix.es_addr.esi, buf, sizeof(buf)),
ipaddr2str(&es->originator_ip, buf1, sizeof(buf1)));
}
assert(ri);
@ -2192,8 +2190,8 @@ static int delete_routes_for_es(struct bgp *bgp, struct evpnes *es)
ret = delete_evpn_type4_route(bgp, es, &p);
if (ret) {
flog_err(EC_BGP_EVPN_ROUTE_DELETE,
"%u failed to delete type-4 route for ESI %s",
bgp->vrf_id, esi_to_str(&es->esi, buf, sizeof(buf)));
"%u failed to delete type-4 route for ESI %s",
bgp->vrf_id, esi_to_str(&es->esi, buf, sizeof(buf)));
}
/* Delete all routes from per ES table */
@ -3151,11 +3149,11 @@ static int install_uninstall_route_in_vrfs(struct bgp *bgp_def, afi_t afi,
if (ret) {
flog_err(EC_BGP_EVPN_FAIL,
"%u: Failed to %s prefix %s in VRF %s",
bgp_def->vrf_id,
install ? "install" : "uninstall",
prefix2str(evp, buf, sizeof(buf)),
vrf_id_to_name(bgp_vrf->vrf_id));
"%u: Failed to %s prefix %s in VRF %s",
bgp_def->vrf_id,
install ? "install" : "uninstall",
prefix2str(evp, buf, sizeof(buf)),
vrf_id_to_name(bgp_vrf->vrf_id));
return ret;
}
}
@ -3186,14 +3184,13 @@ static int install_uninstall_route_in_vnis(struct bgp *bgp, afi_t afi,
ret = uninstall_evpn_route_entry(bgp, vpn, evp, ri);
if (ret) {
flog_err(
EC_BGP_EVPN_FAIL,
"%u: Failed to %s EVPN %s route in VNI %u",
bgp->vrf_id, install ? "install" : "uninstall",
evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE
? "MACIP"
: "IMET",
vpn->vni);
flog_err(EC_BGP_EVPN_FAIL,
"%u: Failed to %s EVPN %s route in VNI %u",
bgp->vrf_id, install ? "install" : "uninstall",
evp->prefix.route_type == BGP_EVPN_MAC_IP_ROUTE
? "MACIP"
: "IMET",
vpn->vni);
return ret;
}
}
@ -3560,8 +3557,8 @@ static int process_type2_route(struct peer *peer, afi_t afi, safi_t safi,
if (psize != 33 && psize != 37 && psize != 49 && psize != 36
&& psize != 40 && psize != 52) {
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
"%u:%s - Rx EVPN Type-2 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
"%u:%s - Rx EVPN Type-2 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
return -1;
}
@ -3671,8 +3668,8 @@ static int process_type3_route(struct peer *peer, afi_t afi, safi_t safi,
*/
if (psize != 17 && psize != 29) {
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
"%u:%s - Rx EVPN Type-3 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
"%u:%s - Rx EVPN Type-3 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
return -1;
}
@ -3752,8 +3749,8 @@ static int process_type4_route(struct peer *peer, afi_t afi, safi_t safi,
*/
if (psize != 23 && psize != 35) {
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
"%u:%s - Rx EVPN Type-4 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
"%u:%s - Rx EVPN Type-4 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
return -1;
}
@ -3817,8 +3814,8 @@ static int process_type5_route(struct peer *peer, afi_t afi, safi_t safi,
*/
if (psize != 34 && psize != 58) {
flog_err(EC_BGP_EVPN_ROUTE_INVALID,
"%u:%s - Rx EVPN Type-5 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
"%u:%s - Rx EVPN Type-5 NLRI with invalid length %d",
peer->bgp->vrf_id, peer->host, psize);
return -1;
}
@ -4124,8 +4121,8 @@ void bgp_evpn_advertise_type5_route(struct bgp *bgp_vrf, struct prefix *p,
ret = update_evpn_type5_route(bgp_vrf, &evp, src_attr);
if (ret)
flog_err(EC_BGP_EVPN_ROUTE_CREATE,
"%u: Failed to create type-5 route for prefix %s",
bgp_vrf->vrf_id, prefix2str(p, buf, sizeof(buf)));
"%u: Failed to create type-5 route for prefix %s",
bgp_vrf->vrf_id, prefix2str(p, buf, sizeof(buf)));
}
/* Inject all prefixes of a particular address-family (currently, IPv4 or
@ -5262,15 +5259,15 @@ int bgp_evpn_local_l3vni_add(vni_t l3vni, vrf_id_t vrf_id, struct ethaddr *rmac,
switch (ret) {
case BGP_ERR_MULTIPLE_INSTANCE_NOT_SET:
flog_err(EC_BGP_MULTI_INSTANCE,
"'bgp multiple-instance' not present\n");
"'bgp multiple-instance' not present\n");
return -1;
case BGP_ERR_AS_MISMATCH:
flog_err(EC_BGP_EVPN_AS_MISMATCH,
"BGP is already running; AS is %u\n", as);
"BGP is already running; AS is %u\n", as);
return -1;
case BGP_ERR_INSTANCE_MISMATCH:
flog_err(EC_BGP_EVPN_INSTANCE_MISMATCH,
"BGP instance name and AS number mismatch\n");
"BGP instance name and AS number mismatch\n");
return -1;
}
@ -5497,8 +5494,8 @@ int bgp_evpn_local_vni_add(struct bgp *bgp, vni_t vni,
build_evpn_type3_prefix(&p, vpn->originator_ip);
if (update_evpn_route(bgp, vpn, &p, 0, 0)) {
flog_err(EC_BGP_EVPN_ROUTE_CREATE,
"%u: Type3 route creation failure for VNI %u",
bgp->vrf_id, vni);
"%u: Type3 route creation failure for VNI %u",
bgp->vrf_id, vni);
return -1;
}
@ -5527,7 +5524,7 @@ int bgp_evpn_local_es_del(struct bgp *bgp,
if (!bgp->esihash) {
flog_err(EC_BGP_ES_CREATE, "%u: ESI hash not yet created",
bgp->vrf_id);
bgp->vrf_id);
return -1;
}
@ -5564,7 +5561,7 @@ int bgp_evpn_local_es_add(struct bgp *bgp,
if (!bgp->esihash) {
flog_err(EC_BGP_ES_CREATE, "%u: ESI hash not yet created",
bgp->vrf_id);
bgp->vrf_id);
return -1;
}
@ -5586,8 +5583,8 @@ int bgp_evpn_local_es_add(struct bgp *bgp,
build_evpn_type4_prefix(&p, esi, originator_ip->ipaddr_v4);
if (update_evpn_type4_route(bgp, es, &p)) {
flog_err(EC_BGP_EVPN_ROUTE_CREATE,
"%u: Type4 route creation failure for ESI %s",
bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf)));
"%u: Type4 route creation failure for ESI %s",
bgp->vrf_id, esi_to_str(esi, buf, sizeof(buf)));
return -1;
}

View File

@ -1890,9 +1890,10 @@ static struct bgpevpn *evpn_create_update_vni(struct bgp *bgp, vni_t vni)
if (!vpn) {
/* Check if this L2VNI is already configured as L3VNI */
if (bgp_evpn_lookup_l3vni_l2vni_table(vni)) {
flog_err(EC_BGP_VNI,
"%u: Failed to create L2VNI %u, it is configured as L3VNI",
bgp->vrf_id, vni);
flog_err(
EC_BGP_VNI,
"%u: Failed to create L2VNI %u, it is configured as L3VNI",
bgp->vrf_id, vni);
return NULL;
}

View File

@ -104,15 +104,14 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
safi = packet->safi;
if (afi == AFI_IP6) {
flog_err(EC_LIB_DEVELOPMENT,
"BGP flowspec IPv6 not supported");
flog_err(EC_LIB_DEVELOPMENT, "BGP flowspec IPv6 not supported");
return -1;
}
if (packet->length >= FLOWSPEC_NLRI_SIZELIMIT) {
flog_err(EC_BGP_FLOWSPEC_PACKET,
"BGP flowspec nlri length maximum reached (%u)",
packet->length);
"BGP flowspec nlri length maximum reached (%u)",
packet->length);
return -1;
}
@ -128,14 +127,16 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
/* When packet overflow occur return immediately. */
if (pnt + psize > lim) {
flog_err(EC_BGP_FLOWSPEC_PACKET,
"Flowspec NLRI length inconsistent ( size %u seen)",
psize);
flog_err(
EC_BGP_FLOWSPEC_PACKET,
"Flowspec NLRI length inconsistent ( size %u seen)",
psize);
return -1;
}
if (bgp_fs_nlri_validate(pnt, psize) < 0) {
flog_err(EC_BGP_FLOWSPEC_PACKET,
"Bad flowspec format or NLRI options not supported");
flog_err(
EC_BGP_FLOWSPEC_PACKET,
"Bad flowspec format or NLRI options not supported");
return -1;
}
p.family = AF_FLOWSPEC;
@ -189,8 +190,8 @@ int bgp_nlri_parse_flowspec(struct peer *peer, struct attr *attr,
NULL, NULL, 0, NULL);
if (ret) {
flog_err(EC_BGP_FLOWSPEC_INSTALLATION,
"Flowspec NLRI failed to be %s.",
attr ? "added" : "withdrawn");
"Flowspec NLRI failed to be %s.",
attr ? "added" : "withdrawn");
return -1;
}
}

View File

@ -69,8 +69,7 @@ static int bgp_flowspec_call_non_opaque_decode(uint8_t *nlri_content, int len,
mval, error);
if (*error < 0)
flog_err(EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_op_decode error %d",
__func__, *error);
"%s: flowspec_op_decode error %d", __func__, *error);
else
*match_num = *error;
return ret;
@ -448,8 +447,8 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len,
prefix, &error);
if (error < 0)
flog_err(EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_ip_address error %d",
__func__, error);
"%s: flowspec_ip_address error %d",
__func__, error);
else
bpem->match_bitmask |= bitmask;
offset += ret;
@ -542,9 +541,10 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len,
len - offset,
&bpem->tcpflags, &error);
if (error < 0)
flog_err(EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_tcpflags_decode error %d",
__func__, error);
flog_err(
EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_tcpflags_decode error %d",
__func__, error);
else
bpem->match_tcpflags_num = error;
/* contains the number of slots used */
@ -557,16 +557,17 @@ int bgp_flowspec_match_rules_fill(uint8_t *nlri_content, int len,
len - offset, &bpem->fragment,
&error);
if (error < 0)
flog_err(EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_fragment_type_decode error %d",
__func__, error);
flog_err(
EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec_fragment_type_decode error %d",
__func__, error);
else
bpem->match_fragment_num = error;
offset += ret;
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: unknown type %d\n",
__func__, type);
__func__, type);
}
}
return error;

View File

@ -1287,8 +1287,8 @@ static int bgp_connect_success(struct peer *peer)
{
if (peer->fd < 0) {
flog_err(EC_BGP_CONNECT,
"bgp_connect_success peer's fd is negative value %d",
peer->fd);
"bgp_connect_success peer's fd is negative value %d",
peer->fd);
bgp_stop(peer);
return -1;
}
@ -1355,9 +1355,9 @@ int bgp_start(struct peer *peer)
if (BGP_PEER_START_SUPPRESSED(peer)) {
if (bgp_debug_neighbor_events(peer))
flog_err(EC_BGP_FSM,
"%s [FSM] Trying to start suppressed peer"
" - this is never supposed to happen!",
peer->host);
"%s [FSM] Trying to start suppressed peer"
" - this is never supposed to happen!",
peer->host);
return -1;
}
@ -1445,8 +1445,8 @@ int bgp_start(struct peer *peer)
peer->host, peer->fd);
if (peer->fd < 0) {
flog_err(EC_BGP_FSM,
"bgp_start peer's fd is negative value %d",
peer->fd);
"bgp_start peer's fd is negative value %d",
peer->fd);
return -1;
}
/*
@ -1492,9 +1492,8 @@ static int bgp_fsm_open(struct peer *peer)
peer and change to Idle status. */
static int bgp_fsm_event_error(struct peer *peer)
{
flog_err(EC_BGP_FSM,
"%s [FSM] unexpected packet received in state %s", peer->host,
lookup_msg(bgp_status_msg, peer->status, NULL));
flog_err(EC_BGP_FSM, "%s [FSM] unexpected packet received in state %s",
peer->host, lookup_msg(bgp_status_msg, peer->status, NULL));
return bgp_stop_with_notify(peer, BGP_NOTIFY_FSM_ERR, 0);
}

View File

@ -403,8 +403,8 @@ static uint16_t bgp_read(struct peer *peer)
/* Fatal error; tear down session */
} else if (nbytes < 0) {
flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] bgp_read_packet error: %s", peer->host,
safe_strerror(errno));
"%s [Error] bgp_read_packet error: %s", peer->host,
safe_strerror(errno));
if (peer->status == Established) {
if (CHECK_FLAG(peer->sflags, PEER_STATUS_NSF_MODE)) {

View File

@ -260,9 +260,9 @@ int bgp_nlri_parse_label(struct peer *peer, struct attr *attr,
/* There needs to be at least one label */
if (prefixlen < 24) {
flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error"
" (wrong label length %d)",
peer->host, prefixlen);
"%s [Error] Update packet error"
" (wrong label length %d)",
peer->host, prefixlen);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_INVAL_NETWORK);
return -1;

View File

@ -128,7 +128,7 @@ static wq_item_status lp_cbq_docallback(struct work_queue *wq, void *data)
if (lcbq->label == MPLS_LABEL_NONE) {
/* shouldn't happen */
flog_err(EC_BGP_LABEL, "%s: error: label==MPLS_LABEL_NONE",
__func__);
__func__);
return WQ_SUCCESS;
}
@ -339,8 +339,8 @@ void bgp_lp_get(
if (rc) {
/* shouldn't happen */
flog_err(EC_BGP_LABEL,
"%s: can't insert new LCB into ledger list",
__func__);
"%s: can't insert new LCB into ledger list",
__func__);
XFREE(MTYPE_BGP_LABEL_CB, lcb);
return;
}
@ -428,8 +428,8 @@ void bgp_lp_event_chunk(uint8_t keep, uint32_t first, uint32_t last)
if (last < first) {
flog_err(EC_BGP_LABEL,
"%s: zebra label chunk invalid: first=%u, last=%u",
__func__, first, last);
"%s: zebra label chunk invalid: first=%u, last=%u",
__func__, first, last);
return;
}

View File

@ -218,8 +218,7 @@ int bgp_nlri_parse_vpn(struct peer *peer, struct attr *attr,
#endif
default:
flog_err(EC_BGP_UPDATE_RCV, "Unknown RD type %d",
type);
flog_err(EC_BGP_UPDATE_RCV, "Unknown RD type %d", type);
break; /* just report */
}
@ -367,9 +366,9 @@ int vpn_leak_label_callback(
}
/* Shouldn't happen: different label allocation */
flog_err(EC_BGP_LABEL,
"%s: %s had label %u but got new assignment %u",
__func__, vp->bgp->name_pretty, vp->tovpn_label,
label);
"%s: %s had label %u but got new assignment %u",
__func__, vp->bgp->name_pretty, vp->tovpn_label,
label);
/* use new one */
}

View File

@ -222,10 +222,9 @@ static int bgp_get_instance_for_inc_conn(int sock, struct bgp **bgp_inst)
rc = getsockopt(sock, SOL_SOCKET, SO_BINDTODEVICE, name, &name_len);
if (rc != 0) {
#if defined(HAVE_CUMULUS)
flog_err(
EC_LIB_SOCKET,
"[Error] BGP SO_BINDTODEVICE get failed (%s), sock %d",
safe_strerror(errno), sock);
flog_err(EC_LIB_SOCKET,
"[Error] BGP SO_BINDTODEVICE get failed (%s), sock %d",
safe_strerror(errno), sock);
return -1;
#endif
}
@ -665,8 +664,7 @@ static int bgp_listener(int sock, struct sockaddr *sa, socklen_t salen,
ret = listen(sock, SOMAXCONN);
if (ret < 0) {
flog_err_sys(EC_LIB_SOCKET, "listen: %s",
safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "listen: %s", safe_strerror(errno));
return ret;
}

View File

@ -524,8 +524,8 @@ static as_t bgp_capability_as4(struct peer *peer, struct capability_header *hdr)
if (hdr->length != CAPABILITY_CODE_AS4_LEN) {
flog_err(EC_BGP_PKT_OPEN,
"%s AS4 capability has incorrect data length %d",
peer->host, hdr->length);
"%s AS4 capability has incorrect data length %d",
peer->host, hdr->length);
return 0;
}
@ -1198,9 +1198,9 @@ int bgp_open_option_parse(struct peer *peer, uint8_t length, int *mp_capability)
&& !peer->afc_nego[AFI_IP6][SAFI_FLOWSPEC]
&& !peer->afc_nego[AFI_L2VPN][SAFI_EVPN]) {
flog_err(EC_BGP_PKT_OPEN,
"%s [Error] Configured AFI/SAFIs do not "
"overlap with received MP capabilities",
peer->host);
"%s [Error] Configured AFI/SAFIs do not "
"overlap with received MP capabilities",
peer->host);
if (error != error_data)
bgp_notify_send_with_data(

View File

@ -1092,8 +1092,8 @@ static int bgp_open_receive(struct peer *peer, bgp_size_t size)
*/
if (CHECK_FLAG(peer->cap, PEER_CAP_AS4_RCV) && !as4) {
flog_err(EC_BGP_PKT_OPEN,
"%s bad OPEN, got AS4 capability, but AS4 set to 0",
peer->host);
"%s bad OPEN, got AS4 capability, but AS4 set to 0",
peer->host);
bgp_notify_send_with_data(peer, BGP_NOTIFY_OPEN_ERR,
BGP_NOTIFY_OPEN_BAD_PEER_AS,
notify_data_remote_as4, 4);
@ -1400,9 +1400,9 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
/* Status must be Established. */
if (peer->status != Established) {
flog_err(EC_BGP_INVALID_STATUS,
"%s [FSM] Update packet received under status %s",
peer->host,
lookup_msg(bgp_status_msg, peer->status, NULL));
"%s [FSM] Update packet received under status %s",
peer->host,
lookup_msg(bgp_status_msg, peer->status, NULL));
bgp_notify_send(peer, BGP_NOTIFY_FSM_ERR, 0);
return BGP_Stop;
}
@ -1424,9 +1424,9 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
Subcode is set to Malformed Attribute List. */
if (stream_pnt(s) + 2 > end) {
flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error"
" (packet length is short for unfeasible length)",
peer->host);
"%s [Error] Update packet error"
" (packet length is short for unfeasible length)",
peer->host);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR);
return BGP_Stop;
@ -1438,9 +1438,9 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
/* Unfeasible Route Length check. */
if (stream_pnt(s) + withdraw_len > end) {
flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Update packet error"
" (packet unfeasible length overflow %d)",
peer->host, withdraw_len);
"%s [Error] Update packet error"
" (packet unfeasible length overflow %d)",
peer->host, withdraw_len);
bgp_notify_send(peer, BGP_NOTIFY_UPDATE_ERR,
BGP_NOTIFY_UPDATE_MAL_ATTR);
return BGP_Stop;
@ -1573,7 +1573,7 @@ static int bgp_update_receive(struct peer *peer, bgp_size_t size)
if (nlri_ret < 0) {
flog_err(EC_BGP_UPDATE_RCV,
"%s [Error] Error parsing NLRI", peer->host);
"%s [Error] Error parsing NLRI", peer->host);
if (peer->status == Established)
bgp_notify_send(
peer, BGP_NOTIFY_UPDATE_ERR,
@ -1745,8 +1745,8 @@ static int bgp_route_refresh_receive(struct peer *peer, bgp_size_t size)
/* If peer does not have the capability, send notification. */
if (!CHECK_FLAG(peer->cap, PEER_CAP_REFRESH_ADV)) {
flog_err(EC_BGP_NO_CAP,
"%s [Error] BGP route refresh is not enabled",
peer->host);
"%s [Error] BGP route refresh is not enabled",
peer->host);
bgp_notify_send(peer, BGP_NOTIFY_HEADER_ERR,
BGP_NOTIFY_HEADER_BAD_MESTYPE);
return BGP_Stop;
@ -2137,8 +2137,8 @@ int bgp_capability_receive(struct peer *peer, bgp_size_t size)
/* If peer does not have the capability, send notification. */
if (!CHECK_FLAG(peer->cap, PEER_CAP_DYNAMIC_ADV)) {
flog_err(EC_BGP_NO_CAP,
"%s [Error] BGP dynamic capability is not enabled",
peer->host);
"%s [Error] BGP dynamic capability is not enabled",
peer->host);
bgp_notify_send(peer, BGP_NOTIFY_HEADER_ERR,
BGP_NOTIFY_HEADER_BAD_MESTYPE);
return BGP_Stop;

View File

@ -653,9 +653,10 @@ static int bgp_pbr_build_and_validate_entry(struct prefix *p,
action_count++;
if (action_count > ACTIONS_MAX_NUM) {
if (BGP_DEBUG(pbr, PBR_ERROR))
flog_err(EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec actions exceeds limit (max %u)",
__func__, action_count);
flog_err(
EC_BGP_FLOWSPEC_PACKET,
"%s: flowspec actions exceeds limit (max %u)",
__func__, action_count);
break;
}
api_action = &api->actions[action_count - 1];
@ -2252,16 +2253,15 @@ void bgp_pbr_update_entry(struct bgp *bgp, struct prefix *p,
if (!bgp_zebra_tm_chunk_obtained()) {
if (BGP_DEBUG(pbr, PBR_ERROR))
flog_err(EC_BGP_TABLE_CHUNK,
"%s: table chunk not obtained yet",
__func__);
"%s: table chunk not obtained yet", __func__);
return;
}
if (bgp_pbr_build_and_validate_entry(p, info, &api) < 0) {
if (BGP_DEBUG(pbr, PBR_ERROR))
flog_err(EC_BGP_FLOWSPEC_INSTALLATION,
"%s: cancel updating entry %p in bgp pbr",
__func__, info);
"%s: cancel updating entry %p in bgp pbr",
__func__, info);
return;
}
bgp_pbr_handle_entry(bgp, info, &api, nlri_update);

View File

@ -9890,12 +9890,14 @@ static int bgp_peer_count_walker(struct thread *t)
if (CHECK_FLAG(ri->flags, BGP_INFO_COUNTED)) {
pc->count[PCOUNT_COUNTED]++;
if (CHECK_FLAG(ri->flags, BGP_INFO_UNUSEABLE))
flog_err(EC_LIB_DEVELOPMENT,
"Attempting to count but flags say it is unusable");
flog_err(
EC_LIB_DEVELOPMENT,
"Attempting to count but flags say it is unusable");
} else {
if (!CHECK_FLAG(ri->flags, BGP_INFO_UNUSEABLE))
flog_err(EC_LIB_DEVELOPMENT,
"Not counted but flags say we should");
flog_err(
EC_LIB_DEVELOPMENT,
"Not counted but flags say we should");
}
}
}

View File

@ -1632,8 +1632,8 @@ void update_group_adjust_peer(struct peer_af *paf)
updgrp = update_group_create(paf);
if (!updgrp) {
flog_err(EC_BGP_UPDGRP_CREATE,
"couldn't create update group for peer %s",
paf->peer->host);
"couldn't create update group for peer %s",
paf->peer->host);
return;
}
}

View File

@ -1079,7 +1079,7 @@ int bgp_zebra_get_table_range(uint32_t chunk_size,
ret = tm_get_table_chunk(zclient, chunk_size, start, end);
if (ret < 0) {
flog_err(EC_BGP_TABLE_CHUNK,
"BGP: Error getting table chunk %u", chunk_size);
"BGP: Error getting table chunk %u", chunk_size);
return -1;
}
zlog_info("BGP: Table Manager returns range from chunk %u is [%u %u]",
@ -2391,9 +2391,9 @@ static int bgp_zebra_process_local_macip(int command, struct zclient *zclient,
if (ipa_len != 0 && ipa_len != IPV4_MAX_BYTELEN
&& ipa_len != IPV6_MAX_BYTELEN) {
flog_err(EC_BGP_MACIP_LEN,
"%u:Recv MACIP %s with invalid IP addr length %d",
vrf_id, (command == ZEBRA_MACIP_ADD) ? "Add" : "Del",
ipa_len);
"%u:Recv MACIP %s with invalid IP addr length %d",
vrf_id, (command == ZEBRA_MACIP_ADD) ? "Add" : "Del",
ipa_len);
return -1;
}
@ -2488,12 +2488,12 @@ static void bgp_zebra_process_label_chunk(
if (zclient->redist_default != proto) {
flog_err(EC_BGP_LM_ERROR, "Got LM msg with wrong proto %u",
proto);
proto);
return;
}
if (zclient->instance != instance) {
flog_err(EC_BGP_LM_ERROR, "Got LM msg with wrong instance %u",
proto);
proto);
return;
}
@ -2502,7 +2502,7 @@ static void bgp_zebra_process_label_chunk(
last > MPLS_LABEL_UNRESERVED_MAX) {
flog_err(EC_BGP_LM_ERROR, "%s: Invalid Label chunk: %u - %u",
__func__, first, last);
__func__, first, last);
return;
}
if (BGP_DEBUG(zebra, ZEBRA)) {

View File

@ -1805,7 +1805,7 @@ static int peer_activate_af(struct peer *peer, afi_t afi, safi_t safi)
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
flog_err(EC_BGP_PEER_GROUP, "%s was called for peer-group %s",
__func__, peer->host);
__func__, peer->host);
return 1;
}
@ -1919,7 +1919,7 @@ static int non_peergroup_deactivate_af(struct peer *peer, afi_t afi,
{
if (CHECK_FLAG(peer->sflags, PEER_STATUS_GROUP)) {
flog_err(EC_BGP_PEER_GROUP, "%s was called for peer-group %s",
__func__, peer->host);
__func__, peer->host);
return 1;
}
@ -1932,8 +1932,8 @@ static int non_peergroup_deactivate_af(struct peer *peer, afi_t afi,
if (peer_af_delete(peer, afi, safi) != 0) {
flog_err(EC_BGP_PEER_DELETE,
"couldn't delete af structure for peer %s",
peer->host);
"couldn't delete af structure for peer %s",
peer->host);
return 1;
}
@ -1983,8 +1983,8 @@ int peer_deactivate(struct peer *peer, afi_t afi, safi_t safi)
if (peer_af_delete(peer, afi, safi) != 0) {
flog_err(EC_BGP_PEER_DELETE,
"couldn't delete af structure for peer %s",
peer->host);
"couldn't delete af structure for peer %s",
peer->host);
}
for (ALL_LIST_ELEMENTS(group->peer, node, nnode, tmp_peer)) {

View File

@ -3943,7 +3943,7 @@ void *rfapi_rfp_init_group_config_ptr_vty(void *rfp_start_val,
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: Unknown group type=%d",
__func__, type);
__func__, type);
/* should never happen */
assert("Unknown type" == NULL);
break;
@ -4058,7 +4058,7 @@ void *rfapi_rfp_get_group_config_ptr_name(
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: Unknown group type=%d",
__func__, type);
__func__, type);
/* should never happen */
assert("Unknown type" == NULL);
break;

View File

@ -3897,8 +3897,7 @@ rfapiBgpInfoFilteredImportFunction(safi_t safi)
default:
/* not expected */
flog_err(EC_LIB_DEVELOPMENT, "%s: bad safi %d", __func__,
safi);
flog_err(EC_LIB_DEVELOPMENT, "%s: bad safi %d", __func__, safi);
return rfapiBgpInfoFilteredImportBadSafi;
}
}

View File

@ -188,8 +188,8 @@ void vnc_direct_bgp_add_route_ce(struct bgp *bgp, struct agg_node *rn,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: can't get afi of route node", __func__);
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of route node",
__func__);
return;
}
@ -700,8 +700,8 @@ void vnc_direct_bgp_add_prefix(struct bgp *bgp,
afi_t afi = family2afi(rn->p.family);
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: can't get afi of route node", __func__);
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of route node",
__func__);
return;
}
@ -811,7 +811,7 @@ void vnc_direct_bgp_del_prefix(struct bgp *bgp,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi route node",
__func__);
__func__);
return;
}
@ -926,8 +926,8 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
afi_t afi = family2afi(rfd->vn_addr.addr_family);
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: can't get afi of nve vn addr", __func__);
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of nve vn addr",
__func__);
return;
}
@ -980,7 +980,7 @@ void vnc_direct_bgp_add_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
rt = import_table->imported_vpn[afi];
} else {
flog_err(EC_LIB_DEVELOPMENT, "%s: bad afi %d",
__func__, afi);
__func__, afi);
return;
}
@ -1073,8 +1073,8 @@ void vnc_direct_bgp_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
afi_t afi = family2afi(rfd->vn_addr.addr_family);
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: can't get afi of nve vn addr", __func__);
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of nve vn addr",
__func__);
return;
}
@ -1122,7 +1122,7 @@ void vnc_direct_bgp_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd)
rt = import_table->imported_vpn[afi];
} else {
flog_err(EC_LIB_DEVELOPMENT, "%s: bad afi %d",
__func__, afi);
__func__, afi);
return;
}
@ -1642,8 +1642,8 @@ void vnc_direct_bgp_rh_add_route(struct bgp *bgp, afi_t afi,
struct attr *iattr;
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: can't get afi of route node", __func__);
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of route node",
__func__);
return;
}
@ -1763,7 +1763,7 @@ void vnc_direct_bgp_rh_del_route(struct bgp *bgp, afi_t afi,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi route node",
__func__);
__func__);
return;
}

View File

@ -604,7 +604,7 @@ static void vnc_import_bgp_add_route_mode_resolve_nve(
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of prefix",
__func__);
__func__);
return;
}
@ -721,7 +721,7 @@ static void vnc_import_bgp_add_route_mode_plain(struct bgp *bgp,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of prefix",
__func__);
__func__);
return;
}
@ -909,7 +909,7 @@ vnc_import_bgp_add_route_mode_nvegroup(struct bgp *bgp, struct prefix *prefix,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of prefix",
__func__);
__func__);
return;
}
@ -2635,7 +2635,7 @@ void vnc_import_bgp_add_route(struct bgp *bgp, struct prefix *prefix,
if (!afi) {
flog_err(EC_LIB_DEVELOPMENT, "%s: can't get afi of prefix",
__func__);
__func__);
return;
}

View File

@ -572,7 +572,7 @@ static void vnc_zebra_add_del_prefix(struct bgp *bgp,
if (rn->p.family != AF_INET && rn->p.family != AF_INET6) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: invalid route node addr family", __func__);
"%s: invalid route node addr family", __func__);
return;
}
@ -645,7 +645,7 @@ static void vnc_zebra_add_del_nve(struct bgp *bgp, struct rfapi_descriptor *rfd,
if (afi != AFI_IP && afi != AFI_IP6) {
flog_err(EC_LIB_DEVELOPMENT, "%s: invalid vn addr family",
__func__);
__func__);
return;
}
@ -749,7 +749,7 @@ static void vnc_zebra_add_del_group_afi(struct bgp *bgp,
if (!family) {
flog_err(EC_LIB_DEVELOPMENT, "%s: computed bad family: %d",
__func__, family);
__func__, family);
return;
}

View File

@ -422,8 +422,8 @@ void eigrp_sw_version_initialize(void)
&FRR_MINOR);
if (ret != 2)
flog_err(EC_EIGRP_PACKET,
"Did not Properly parse %s, please fix VERSION string",
VERSION);
"Did not Properly parse %s, please fix VERSION string",
VERSION);
}
/**

View File

@ -337,7 +337,7 @@ void eigrp_nbr_hard_restart(struct eigrp_neighbor *nbr, struct vty *vty)
{
if (nbr == NULL) {
flog_err(EC_EIGRP_CONFIG,
"Nbr Hard restart: Neighbor not specified.");
"Nbr Hard restart: Neighbor not specified.");
return;
}

View File

@ -349,13 +349,13 @@ int eigrp_write(struct thread *thread)
ep = eigrp_fifo_next(ei->obuf);
if (!ep) {
flog_err(EC_LIB_DEVELOPMENT,
"%s: Interface %s no packet on queue?",
__PRETTY_FUNCTION__, ei->ifp->name);
"%s: Interface %s no packet on queue?",
__PRETTY_FUNCTION__, ei->ifp->name);
goto out;
}
if (ep->length < EIGRP_HEADER_LEN) {
flog_err(EC_EIGRP_PACKET,
"%s: Packet just has a header?", __PRETTY_FUNCTION__);
flog_err(EC_EIGRP_PACKET, "%s: Packet just has a header?",
__PRETTY_FUNCTION__);
eigrp_header_dump((struct eigrp_header *)ep->s->data);
eigrp_packet_delete(ei);
goto out;
@ -1214,9 +1214,8 @@ uint16_t eigrp_add_internalTLV_to_stream(struct stream *s,
stream_putw(s, length);
break;
default:
flog_err(EC_LIB_DEVELOPMENT,
"%s: Unexpected prefix length: %d",
__PRETTY_FUNCTION__, pe->destination->prefixlen);
flog_err(EC_LIB_DEVELOPMENT, "%s: Unexpected prefix length: %d",
__PRETTY_FUNCTION__, pe->destination->prefixlen);
return 0;
}
stream_putl(s, 0x00000000);

View File

@ -170,10 +170,11 @@ void eigrp_reply_receive(struct eigrp *eigrp, struct ip *iph,
if (!dest) {
char buf[PREFIX_STRLEN];
flog_err(EC_EIGRP_PACKET,
"%s: Received prefix %s which we do not know about",
__PRETTY_FUNCTION__,
prefix2str(&dest_addr, buf, sizeof(buf)));
flog_err(
EC_EIGRP_PACKET,
"%s: Received prefix %s which we do not know about",
__PRETTY_FUNCTION__,
prefix2str(&dest_addr, buf, sizeof(buf)));
eigrp_IPv4_InternalTLV_free(tlv);
continue;
}

View File

@ -413,7 +413,7 @@ eigrp_topology_update_distance(struct eigrp_fsm_action_message *msg)
break;
default:
flog_err(EC_LIB_DEVELOPMENT, "%s: Please implement handler",
__PRETTY_FUNCTION__);
__PRETTY_FUNCTION__);
break;
}
distance_done:

View File

@ -1278,8 +1278,8 @@ static int lsp_regenerate(struct isis_area *area, int level)
if (!lsp) {
flog_err(EC_LIB_DEVELOPMENT,
"ISIS-Upd (%s): lsp_regenerate: no L%d LSP found!",
area->area_tag, level);
"ISIS-Upd (%s): lsp_regenerate: no L%d LSP found!",
area->area_tag, level);
return ISIS_ERROR;
}
@ -1647,8 +1647,8 @@ static int lsp_regenerate_pseudo(struct isis_circuit *circuit, int level)
if (!lsp) {
flog_err(EC_LIB_DEVELOPMENT,
"lsp_regenerate_pseudo: no l%d LSP %s found!", level,
rawlspid_print(lsp_id));
"lsp_regenerate_pseudo: no l%d LSP %s found!", level,
rawlspid_print(lsp_id));
return ISIS_ERROR;
}

View File

@ -91,9 +91,9 @@ static int ack_lsp(struct isis_lsp_hdr *hdr, struct isis_circuit *circuit,
retval = circuit->tx(circuit, level);
if (retval != ISIS_OK)
flog_err(EC_ISIS_PACKET,
"ISIS-Upd (%s): Send L%d LSP PSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
"ISIS-Upd (%s): Send L%d LSP PSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
return retval;
}
@ -626,8 +626,8 @@ static int process_hello(uint8_t pdu_type, struct isis_circuit *circuit,
if (!p2p_hello && !(level & iih.circ_type)) {
flog_err(EC_ISIS_PACKET,
"Level %d LAN Hello with Circuit Type %d", level,
iih.circ_type);
"Level %d LAN Hello with Circuit Type %d", level,
iih.circ_type);
return ISIS_ERROR;
}
@ -1424,13 +1424,13 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
if (idrp == ISO9542_ESIS) {
flog_err(EC_LIB_DEVELOPMENT,
"No support for ES-IS packet IDRP=%" PRIx8, idrp);
"No support for ES-IS packet IDRP=%" PRIx8, idrp);
return ISIS_ERROR;
}
if (idrp != ISO10589_ISIS) {
flog_err(EC_ISIS_PACKET, "Not an IS-IS packet IDRP=%" PRIx8,
idrp);
idrp);
return ISIS_ERROR;
}
@ -1456,9 +1456,9 @@ int isis_handle_pdu(struct isis_circuit *circuit, uint8_t *ssnpa)
if (length != expected_length) {
flog_err(EC_ISIS_PACKET,
"Exepected fixed header length = %" PRIu8
" but got %" PRIu8,
expected_length, length);
"Exepected fixed header length = %" PRIu8
" but got %" PRIu8,
expected_length, length);
return ISIS_ERROR;
}
@ -1728,9 +1728,9 @@ int send_hello(struct isis_circuit *circuit, int level)
retval = circuit->tx(circuit, level);
if (retval != ISIS_OK)
flog_err(EC_ISIS_PACKET,
"ISIS-Adj (%s): Send L%d IIH on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
"ISIS-Adj (%s): Send L%d IIH on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
return retval;
}
@ -1926,9 +1926,9 @@ int send_csnp(struct isis_circuit *circuit, int level)
int retval = circuit->tx(circuit, level);
if (retval != ISIS_OK) {
flog_err(EC_ISIS_PACKET,
"ISIS-Snp (%s): Send L%d CSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
"ISIS-Snp (%s): Send L%d CSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
isis_free_tlvs(tlvs);
return retval;
}
@ -2093,9 +2093,9 @@ static int send_psnp(int level, struct isis_circuit *circuit)
int retval = circuit->tx(circuit, level);
if (retval != ISIS_OK) {
flog_err(EC_ISIS_PACKET,
"ISIS-Snp (%s): Send L%d PSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
"ISIS-Snp (%s): Send L%d PSNP on %s failed",
circuit->area->area_tag, level,
circuit->interface->name);
isis_free_tlvs(tlvs);
return retval;
}
@ -2229,11 +2229,11 @@ void send_lsp(void *arg, struct isis_lsp *lsp, enum isis_tx_type tx_type)
retval = circuit->tx(circuit, lsp->level);
if (retval != ISIS_OK) {
flog_err(EC_ISIS_PACKET,
"ISIS-Upd (%s): Send L%d LSP on %s failed %s",
circuit->area->area_tag, lsp->level,
circuit->interface->name,
(retval == ISIS_WARNING) ? "temporarily"
: "permanently");
"ISIS-Upd (%s): Send L%d LSP on %s failed %s",
circuit->area->area_tag, lsp->level,
circuit->interface->name,
(retval == ISIS_WARNING) ? "temporarily"
: "permanently");
}
out:

View File

@ -142,20 +142,16 @@ static int agentx_log_callback(int major, int minor, void *serverarg,
msg[strlen(msg) - 1] = '\0';
switch (slm->priority) {
case LOG_EMERG:
flog_err(EC_LIB_SNMP,
"snmp[emerg]: %s", msg ? msg : slm->msg);
flog_err(EC_LIB_SNMP, "snmp[emerg]: %s", msg ? msg : slm->msg);
break;
case LOG_ALERT:
flog_err(EC_LIB_SNMP,
"snmp[alert]: %s", msg ? msg : slm->msg);
flog_err(EC_LIB_SNMP, "snmp[alert]: %s", msg ? msg : slm->msg);
break;
case LOG_CRIT:
flog_err(EC_LIB_SNMP,
"snmp[crit]: %s", msg ? msg : slm->msg);
flog_err(EC_LIB_SNMP, "snmp[crit]: %s", msg ? msg : slm->msg);
break;
case LOG_ERR:
flog_err(EC_LIB_SNMP,
"snmp[err]: %s", msg ? msg : slm->msg);
flog_err(EC_LIB_SNMP, "snmp[err]: %s", msg ? msg : slm->msg);
break;
case LOG_WARNING:
flog_warn(EC_LIB_SNMP, "snmp[warning]: %s",

View File

@ -142,7 +142,7 @@ static int frrzmq_read_msg(struct thread *t)
out_err:
flog_err(EC_LIB_ZMQ, "ZeroMQ read error: %s(%d)", strerror(errno),
errno);
errno);
if (cb->read.cb_error)
cb->read.cb_error(cb->read.arg, cb->zmqsock);
return 1;
@ -256,7 +256,7 @@ static int frrzmq_write_msg(struct thread *t)
out_err:
flog_err(EC_LIB_ZMQ, "ZeroMQ write error: %s(%d)", strerror(errno),
errno);
errno);
if (cb->write.cb_error)
cb->write.cb_error(cb->write.arg, cb->zmqsock);
return 1;

View File

@ -297,35 +297,31 @@ DECLARE_QOBJ_TYPE(interface)
#define IFNAME_RB_INSERT(vrf, ifp) \
if (RB_INSERT(if_name_head, &vrf->ifaces_by_name, (ifp))) \
flog_err( \
EC_LIB_INTERFACE, \
"%s(%s): corruption detected -- interface with this " \
"name exists already in VRF %u!", \
__func__, (ifp)->name, (ifp)->vrf_id);
flog_err(EC_LIB_INTERFACE, \
"%s(%s): corruption detected -- interface with this " \
"name exists already in VRF %u!", \
__func__, (ifp)->name, (ifp)->vrf_id);
#define IFNAME_RB_REMOVE(vrf, ifp) \
if (RB_REMOVE(if_name_head, &vrf->ifaces_by_name, (ifp)) == NULL) \
flog_err( \
EC_LIB_INTERFACE, \
"%s(%s): corruption detected -- interface with this " \
"name doesn't exist in VRF %u!", \
__func__, (ifp)->name, (ifp)->vrf_id);
flog_err(EC_LIB_INTERFACE, \
"%s(%s): corruption detected -- interface with this " \
"name doesn't exist in VRF %u!", \
__func__, (ifp)->name, (ifp)->vrf_id);
#define IFINDEX_RB_INSERT(vrf, ifp) \
if (RB_INSERT(if_index_head, &vrf->ifaces_by_index, (ifp))) \
flog_err( \
EC_LIB_INTERFACE, \
"%s(%u): corruption detected -- interface with this " \
"ifindex exists already in VRF %u!", \
__func__, (ifp)->ifindex, (ifp)->vrf_id);
flog_err(EC_LIB_INTERFACE, \
"%s(%u): corruption detected -- interface with this " \
"ifindex exists already in VRF %u!", \
__func__, (ifp)->ifindex, (ifp)->vrf_id);
#define IFINDEX_RB_REMOVE(vrf, ifp) \
if (RB_REMOVE(if_index_head, &vrf->ifaces_by_index, (ifp)) == NULL) \
flog_err( \
EC_LIB_INTERFACE, \
"%s(%u): corruption detected -- interface with this " \
"ifindex doesn't exist in VRF %u!", \
__func__, (ifp)->ifindex, (ifp)->vrf_id);
flog_err(EC_LIB_INTERFACE, \
"%s(%u): corruption detected -- interface with this " \
"ifindex doesn't exist in VRF %u!", \
__func__, (ifp)->ifindex, (ifp)->vrf_id);
#define FOR_ALL_INTERFACES(vrf, ifp) \
if (vrf) \

View File

@ -274,12 +274,14 @@ static void frr_guard_daemon(void)
lock.l_type = F_WRLCK;
lock.l_whence = SEEK_SET;
if (fcntl(fd, F_GETLK, &lock) < 0) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
flog_err_sys(
EC_LIB_SYSTEM_CALL,
"Could not do F_GETLK pid_file %s (%s), exiting",
path, safe_strerror(errno));
exit(1);
} else if (lock.l_type == F_WRLCK) {
flog_err_sys(EC_LIB_SYSTEM_CALL,
flog_err_sys(
EC_LIB_SYSTEM_CALL,
"Process %d has a write lock on file %s already! Error: (%s)",
lock.l_pid, path, safe_strerror(errno));
exit(1);
@ -543,15 +545,15 @@ static void frr_mkdir(const char *path, bool strip)
if (errno == EEXIST)
return;
flog_err(EC_LIB_SYSTEM_CALL, "failed to mkdir \"%s\": %s",
path, strerror(errno));
flog_err(EC_LIB_SYSTEM_CALL, "failed to mkdir \"%s\": %s", path,
strerror(errno));
return;
}
zprivs_get_ids(&ids);
if (chown(path, ids.uid_normal, ids.gid_normal))
flog_err(EC_LIB_SYSTEM_CALL, "failed to chown \"%s\": %s",
path, strerror(errno));
flog_err(EC_LIB_SYSTEM_CALL, "failed to chown \"%s\": %s", path,
strerror(errno));
}
static struct thread_master *master;

View File

@ -990,7 +990,7 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute)
if (zroute >= array_size(route_types)) {
flog_err(EC_LIB_DEVELOPMENT, "unknown zebra route type: %u",
zroute);
zroute);
return &unknown;
}
if (zroute == route_types[zroute].type)
@ -1005,8 +1005,7 @@ static const struct zebra_desc_table *zroute_lookup(unsigned int zroute)
}
}
flog_err(EC_LIB_DEVELOPMENT,
"internal error: cannot find route type %u in table!",
zroute);
"internal error: cannot find route type %u in table!", zroute);
return &unknown;
}
@ -1024,7 +1023,7 @@ const char *zserv_command_string(unsigned int command)
{
if (command >= array_size(command_types)) {
flog_err(EC_LIB_DEVELOPMENT, "unknown zserv command type: %u",
command);
command);
return unknown.string;
}
return command_types[command].string;

View File

@ -228,8 +228,8 @@ static int ns_enable_internal(struct ns *ns, void (*func)(ns_id_t, void *))
/* Non default NS. leave */
if (ns->ns_id == NS_UNKNOWN) {
flog_err(EC_LIB_NS,
"Can not enable NS %s %u: Invalid NSID",
ns->name, ns->ns_id);
"Can not enable NS %s %u: Invalid NSID",
ns->name, ns->ns_id);
return 0;
}
if (func)
@ -488,7 +488,7 @@ void ns_init_management(ns_id_t default_ns_id, ns_id_t internal_ns)
default_ns = ns_get_created_internal(NULL, NULL, default_ns_id);
if (!default_ns) {
flog_err(EC_LIB_NS, "%s: failed to create the default NS!",
__func__);
__func__);
exit(1);
}
if (have_netns()) {
@ -506,7 +506,7 @@ void ns_init_management(ns_id_t default_ns_id, ns_id_t internal_ns)
/* Enable the default NS. */
if (!ns_enable(default_ns, NULL)) {
flog_err(EC_LIB_NS, "%s: failed to enable the default NS!",
__func__);
__func__);
exit(1);
}
}

View File

@ -658,8 +658,8 @@ void prefix_copy(struct prefix *dest, const struct prefix *src)
(void *)src->u.prefix_flowspec.ptr, len);
} else {
flog_err(EC_LIB_DEVELOPMENT,
"prefix_copy(): Unknown address family %d",
src->family);
"prefix_copy(): Unknown address family %d",
src->family);
assert(0);
}
}

View File

@ -184,7 +184,7 @@ int skiplist_insert(register struct skiplist *l, register void *key,
/* DEBUG */
if (!key) {
flog_err(EC_LIB_DEVELOPMENT, "%s: key is 0, value is %p",
__func__, value);
__func__, value);
}
p = l->header;

View File

@ -129,8 +129,7 @@ int setsockopt_ipv6_multicast_hops(int sock, int val)
ret = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_HOPS, &val,
sizeof(val));
if (ret < 0)
flog_err(EC_LIB_SOCKET,
"can't setsockopt IPV6_MULTICAST_HOPS");
flog_err(EC_LIB_SOCKET, "can't setsockopt IPV6_MULTICAST_HOPS");
return ret;
}
@ -171,8 +170,7 @@ int setsockopt_ipv6_multicast_loop(int sock, int val)
ret = setsockopt(sock, IPPROTO_IPV6, IPV6_MULTICAST_LOOP, &val,
sizeof(val));
if (ret < 0)
flog_err(EC_LIB_SOCKET,
"can't setsockopt IPV6_MULTICAST_LOOP");
flog_err(EC_LIB_SOCKET, "can't setsockopt IPV6_MULTICAST_LOOP");
return ret;
}

View File

@ -576,8 +576,7 @@ union sockunion *sockunion_getpeername(int fd)
len = sizeof name;
ret = getpeername(fd, (struct sockaddr *)&name, &len);
if (ret < 0) {
flog_err(EC_LIB_SOCKET,
"Can't get remote address and port: %s",
flog_err(EC_LIB_SOCKET, "Can't get remote address and port: %s",
safe_strerror(errno));
return NULL;
}

View File

@ -54,7 +54,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO")
* using stream_put..._at() functions.
*/
#define STREAM_WARN_OFFSETS(S) \
flog_warn(EC_LIB_STREAM, \
flog_warn(EC_LIB_STREAM, \
"&(struct stream): %p, size: %lu, getp: %lu, endp: %lu\n", \
(void *)(S), (unsigned long)(S)->size, \
(unsigned long)(S)->getp, (unsigned long)(S)->endp)
@ -69,7 +69,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO")
#define STREAM_BOUND_WARN(S, WHAT) \
do { \
flog_warn(EC_LIB_STREAM, "%s: Attempt to %s out of bounds", \
flog_warn(EC_LIB_STREAM, "%s: Attempt to %s out of bounds", \
__func__, (WHAT)); \
STREAM_WARN_OFFSETS(S); \
assert(0); \
@ -77,7 +77,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO")
#define STREAM_BOUND_WARN2(S, WHAT) \
do { \
flog_warn(EC_LIB_STREAM, "%s: Attempt to %s out of bounds", \
flog_warn(EC_LIB_STREAM, "%s: Attempt to %s out of bounds", \
__func__, (WHAT)); \
STREAM_WARN_OFFSETS(S); \
} while (0)
@ -87,7 +87,7 @@ DEFINE_MTYPE_STATIC(LIB, STREAM_FIFO, "Stream FIFO")
do { \
if (((S)->endp + (Z)) > (S)->size) { \
flog_warn( \
EC_LIB_STREAM, \
EC_LIB_STREAM, \
"CHECK_SIZE: truncating requested size %lu\n", \
(unsigned long)(Z)); \
STREAM_WARN_OFFSETS(S); \

View File

@ -490,7 +490,7 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
default_vrf = vrf_get(VRF_DEFAULT, VRF_DEFAULT_NAME);
if (!default_vrf) {
flog_err(EC_LIB_VRF_START,
"vrf_init: failed to create the default VRF!");
"vrf_init: failed to create the default VRF!");
exit(1);
}
if (vrf_is_backend_netns()) {
@ -506,7 +506,7 @@ void vrf_init(int (*create)(struct vrf *), int (*enable)(struct vrf *),
/* Enable the default VRF. */
if (!vrf_enable(default_vrf)) {
flog_err(EC_LIB_VRF_START,
"vrf_init: failed to enable the default VRF!");
"vrf_init: failed to enable the default VRF!");
exit(1);
}

View File

@ -2420,9 +2420,8 @@ static void vty_read_file(FILE *confp)
nl = strchr(vty->error_buf, '\n');
if (nl)
*nl = '\0';
flog_err(EC_LIB_VTY,
"ERROR: %s on config line %u: %s", message, line_num,
vty->error_buf);
flog_err(EC_LIB_VTY, "ERROR: %s on config line %u: %s", message,
line_num, vty->error_buf);
}
vty_close(vty);
@ -2523,8 +2522,8 @@ bool vty_read_config(const char *config_file, char *config_default_dir)
"WARNING: using backup configuration file!");
else {
flog_err(EC_LIB_VTY,
"can't open configuration file [%s]",
config_file);
"can't open configuration file [%s]",
config_file);
exit(1);
}
}
@ -2574,8 +2573,8 @@ bool vty_read_config(const char *config_file, char *config_default_dir)
fullpath = config_default_dir;
} else {
flog_err(EC_LIB_VTY,
"can't open configuration file [%s]",
config_default_dir);
"can't open configuration file [%s]",
config_default_dir);
goto tmp_free_and_out;
}
} else

View File

@ -315,9 +315,10 @@ int zclient_read_header(struct stream *s, int sock, uint16_t *size,
STREAM_GETW(s, *cmd);
if (*version != ZSERV_VERSION || *marker != ZEBRA_HEADER_MARKER) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: socket %d version mismatch, marker %d, version %d",
__func__, sock, *marker, *version);
flog_err(
EC_LIB_ZAPI_MISSMATCH,
"%s: socket %d version mismatch, marker %d, version %d",
__func__, sock, *marker, *version);
return -1;
}
@ -819,11 +820,11 @@ int zapi_route_encode(uint8_t cmd, struct stream *s, struct zapi_route *api)
prefix2str(&api->prefix, buf,
sizeof(buf));
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: prefix %s: can't encode "
"%u labels (maximum is %u)",
__func__, buf,
api_nh->label_num,
MPLS_MAX_LABELS);
"%s: prefix %s: can't encode "
"%u labels (maximum is %u)",
__func__, buf,
api_nh->label_num,
MPLS_MAX_LABELS);
return -1;
}
@ -1451,10 +1452,11 @@ static void link_params_set_value(struct stream *s, struct if_link_params *iflp)
for (i = 0; i < bwclassnum && i < MAX_CLASS_TYPE; i++)
iflp->unrsv_bw[i] = stream_getf(s);
if (i < bwclassnum)
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: received %d > %d (MAX_CLASS_TYPE) bw entries"
" - outdated library?",
__func__, bwclassnum, MAX_CLASS_TYPE);
flog_err(
EC_LIB_ZAPI_MISSMATCH,
"%s: received %d > %d (MAX_CLASS_TYPE) bw entries"
" - outdated library?",
__func__, bwclassnum, MAX_CLASS_TYPE);
}
iflp->admin_grp = stream_getl(s);
iflp->rmt_as = stream_getl(s);
@ -1484,8 +1486,8 @@ struct interface *zebra_interface_link_params_read(struct stream *s)
if (ifp == NULL) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: unknown ifindex %u, shouldn't happen", __func__,
ifindex);
"%s: unknown ifindex %u, shouldn't happen", __func__,
ifindex);
return NULL;
}
@ -1823,8 +1825,8 @@ static int zclient_read_sync_response(struct zclient *zclient,
size);
}
if (ret != 0) {
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: Invalid Sync Message Reply", __func__);
flog_err(EC_LIB_ZAPI_ENCODE, "%s: Invalid Sync Message Reply",
__func__);
return -1;
}
@ -1893,13 +1895,15 @@ int lm_label_manager_connect(struct zclient *zclient)
/* sanity */
if (proto != zclient->redist_default)
flog_err(EC_LIB_ZAPI_ENCODE,
"Wrong proto (%u) in LM connect response. Should be %u",
proto, zclient->redist_default);
flog_err(
EC_LIB_ZAPI_ENCODE,
"Wrong proto (%u) in LM connect response. Should be %u",
proto, zclient->redist_default);
if (instance != zclient->instance)
flog_err(EC_LIB_ZAPI_ENCODE,
"Wrong instId (%u) in LM connect response. Should be %u",
instance, zclient->instance);
flog_err(
EC_LIB_ZAPI_ENCODE,
"Wrong instId (%u) in LM connect response. Should be %u",
instance, zclient->instance);
/* result code */
result = stream_getc(s);
@ -1988,15 +1992,13 @@ int lm_get_label_chunk(struct zclient *zclient, uint8_t keep,
ret = writen(zclient->sock, s->data, stream_get_endp(s));
if (ret < 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"Can't write to zclient sock");
flog_err(EC_LIB_ZAPI_SOCKET, "Can't write to zclient sock");
close(zclient->sock);
zclient->sock = -1;
return -1;
}
if (ret == 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"Zclient sock closed");
flog_err(EC_LIB_ZAPI_SOCKET, "Zclient sock closed");
close(zclient->sock);
zclient->sock = -1;
return -1;
@ -2018,12 +2020,12 @@ int lm_get_label_chunk(struct zclient *zclient, uint8_t keep,
/* sanities */
if (proto != zclient->redist_default)
flog_err(EC_LIB_ZAPI_ENCODE,
"Wrong proto (%u) in get chunk response. Should be %u",
proto, zclient->redist_default);
"Wrong proto (%u) in get chunk response. Should be %u",
proto, zclient->redist_default);
if (instance != zclient->instance)
flog_err(EC_LIB_ZAPI_ENCODE,
"Wrong instId (%u) in get chunk response Should be %u",
instance, zclient->instance);
"Wrong instId (%u) in get chunk response Should be %u",
instance, zclient->instance);
/* keep */
response_keep = stream_getc(s);
@ -2033,15 +2035,16 @@ int lm_get_label_chunk(struct zclient *zclient, uint8_t keep,
/* not owning this response */
if (keep != response_keep) {
flog_err(EC_LIB_ZAPI_ENCODE,
"Invalid Label chunk: %u - %u, keeps mismatch %u != %u",
*start, *end, keep, response_keep);
flog_err(
EC_LIB_ZAPI_ENCODE,
"Invalid Label chunk: %u - %u, keeps mismatch %u != %u",
*start, *end, keep, response_keep);
}
/* sanity */
if (*start > *end || *start < MPLS_LABEL_UNRESERVED_MIN
|| *end > MPLS_LABEL_UNRESERVED_MAX) {
flog_err(EC_LIB_ZAPI_ENCODE,
"Invalid Label chunk: %u - %u", *start, *end);
flog_err(EC_LIB_ZAPI_ENCODE, "Invalid Label chunk: %u - %u",
*start, *end);
return -1;
}
@ -2097,8 +2100,7 @@ int lm_release_label_chunk(struct zclient *zclient, uint32_t start,
return -1;
}
if (ret == 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"Zclient sock connection closed");
flog_err(EC_LIB_ZAPI_SOCKET, "Zclient sock connection closed");
close(zclient->sock);
zclient->sock = -1;
return -1;
@ -2201,15 +2203,15 @@ int tm_get_table_chunk(struct zclient *zclient, uint32_t chunk_size,
ret = writen(zclient->sock, s->data, stream_get_endp(s));
if (ret < 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"%s: can't write to zclient->sock", __func__);
flog_err(EC_LIB_ZAPI_SOCKET, "%s: can't write to zclient->sock",
__func__);
close(zclient->sock);
zclient->sock = -1;
return -1;
}
if (ret == 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"%s: zclient->sock connection closed", __func__);
"%s: zclient->sock connection closed", __func__);
close(zclient->sock);
zclient->sock = -1;
return -1;
@ -2295,8 +2297,7 @@ int zebra_send_pw(struct zclient *zclient, int command, struct zapi_pw *pw)
stream_write(s, (uint8_t *)&pw->nexthop.ipv6, 16);
break;
default:
flog_err(EC_LIB_ZAPI_ENCODE,
"%s: unknown af", __func__);
flog_err(EC_LIB_ZAPI_ENCODE, "%s: unknown af", __func__);
return -1;
}
@ -2398,16 +2399,17 @@ static int zclient_read(struct thread *thread)
command = stream_getw(zclient->ibuf);
if (marker != ZEBRA_HEADER_MARKER || version != ZSERV_VERSION) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: socket %d version mismatch, marker %d, version %d",
__func__, zclient->sock, marker, version);
flog_err(
EC_LIB_ZAPI_MISSMATCH,
"%s: socket %d version mismatch, marker %d, version %d",
__func__, zclient->sock, marker, version);
return zclient_failed(zclient);
}
if (length < ZEBRA_HEADER_SIZE) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: socket %d message length %u is less than %d ",
__func__, zclient->sock, length, ZEBRA_HEADER_SIZE);
"%s: socket %d message length %u is less than %d ",
__func__, zclient->sock, length, ZEBRA_HEADER_SIZE);
return zclient_failed(zclient);
}

View File

@ -198,9 +198,10 @@ void resolver_resolve(struct resolver_query *query, int af,
union sockunion *))
{
if (query->callback != NULL) {
flog_err(EC_NHRP_RESOLVER,
"Trying to resolve '%s', but previous query was not finished yet",
hostname);
flog_err(
EC_NHRP_RESOLVER,
"Trying to resolve '%s', but previous query was not finished yet",
hostname);
return;
}

View File

@ -218,9 +218,10 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
if (str2sockunion(buf,
&sactx->local.host)
< 0)
flog_err(EC_NHRP_SWAN,
"VICI: bad strongSwan local-host: %s",
buf);
flog_err(
EC_NHRP_SWAN,
"VICI: bad strongSwan local-host: %s",
buf);
} else if (blob_equal(key, "local-id")
&& ctx->nsections == 1) {
sactx->local.id = *val;
@ -236,9 +237,10 @@ static void parse_sa_message(struct vici_message_ctx *ctx,
if (str2sockunion(buf,
&sactx->remote.host)
< 0)
flog_err(EC_NHRP_SWAN,
"VICI: bad strongSwan remote-host: %s",
buf);
flog_err(
EC_NHRP_SWAN,
"VICI: bad strongSwan remote-host: %s",
buf);
} else if (blob_equal(key, "remote-id")
&& ctx->nsections == 1) {
sactx->remote.id = *val;
@ -340,7 +342,8 @@ static void vici_recv_message(struct vici_conn *vici, struct zbuf *msg)
break;
case VICI_EVENT_UNKNOWN:
case VICI_CMD_UNKNOWN:
flog_err(EC_NHRP_SWAN,
flog_err(
EC_NHRP_SWAN,
"VICI: StrongSwan does not support mandatory events (unpatched?)");
break;
case VICI_EVENT_CONFIRM:

View File

@ -1559,8 +1559,7 @@ int ospf6_receive(struct thread *thread)
/* receive message */
len = ospf6_recvmsg(&src, &dst, &ifindex, iovector);
if (len > iobuflen) {
flog_err(EC_LIB_DEVELOPMENT,
"Excess message read");
flog_err(EC_LIB_DEVELOPMENT, "Excess message read");
return 0;
}

View File

@ -575,7 +575,8 @@ static void route_table_assert(struct ospf6_route_table *table)
return;
flog_err(EC_LIB_DEVELOPMENT, "PANIC !!");
flog_err(EC_LIB_DEVELOPMENT, "Something has gone wrong with ospf6_route_table[%p]", table);
flog_err(EC_LIB_DEVELOPMENT,
"Something has gone wrong with ospf6_route_table[%p]", table);
zlog_debug("table count = %d, real number = %d", table->count, num);
zlog_debug("DUMP START");
for (r = ospf6_route_head(table); r; r = ospf6_route_next(r)) {

View File

@ -273,8 +273,8 @@ static void ospf6_nexthop_calc(struct ospf6_vertex *w, struct ospf6_vertex *v,
ifindex = (VERTEX_IS_TYPE(NETWORK, v) ? ospf6_spf_get_ifindex_from_nh(v)
: ROUTER_LSDESC_GET_IFID(lsdesc));
if (ifindex == 0) {
flog_err(EC_LIB_DEVELOPMENT,
"No nexthop ifindex at vertex %s", v->name);
flog_err(EC_LIB_DEVELOPMENT, "No nexthop ifindex at vertex %s",
v->name);
return;
}

View File

@ -364,9 +364,9 @@ static void ospf6_zebra_route_update(int type, struct ospf6_route *request)
if (ret < 0)
flog_err(EC_LIB_ZAPI_SOCKET,
"zclient_route_send() %s failed: %s",
(type == REM ? "delete" : "add"),
safe_strerror(errno));
"zclient_route_send() %s failed: %s",
(type == REM ? "delete" : "add"),
safe_strerror(errno));
return;
}

View File

@ -217,7 +217,7 @@ int main(int argc, char **argv)
when quagga(ospfd) is restarted */
if (!ospf_get_instance(instance)) {
flog_err(EC_OSPF_INIT_FAIL, "OSPF instance init failed: %s",
strerror(errno));
strerror(errno));
exit(1);
}

View File

@ -225,8 +225,7 @@ int ospf_sock_init(struct ospf *ospf)
}
#else /* !IPTOS_PREC_INTERNETCONTROL */
#warning "IP_HDRINCL not available, nor is IPTOS_PREC_INTERNETCONTROL"
flog_err(EC_LIB_UNAVAILABLE,
"IP_HDRINCL option not available");
flog_err(EC_LIB_UNAVAILABLE, "IP_HDRINCL option not available");
#endif /* IP_HDRINCL */
ret = setsockopt_ifindex(AF_INET, ospf_sock, 1);

View File

@ -342,9 +342,8 @@ static int ospf_check_md5_digest(struct ospf_interface *oi,
ck = ospf_crypt_key_lookup(OSPF_IF_PARAM(oi, auth_crypt),
ospfh->u.crypt.key_id);
if (ck == NULL) {
flog_warn(EC_OSPF_MD5,
"interface %s: ospf_check_md5 no key %d", IF_NAME(oi),
ospfh->u.crypt.key_id);
flog_warn(EC_OSPF_MD5, "interface %s: ospf_check_md5 no key %d",
IF_NAME(oi), ospfh->u.crypt.key_id);
return 0;
}
@ -1336,8 +1335,7 @@ static void ospf_db_desc(struct ip *iph, struct ospf_header *ospfh,
* In Hello protocol, optional capability must have checked
* to prevent this T-bit enabled router be my neighbor.
*/
flog_warn(EC_OSPF_PACKET,
"Packet[DD]: Neighbor %s: T-bit on?",
flog_warn(EC_OSPF_PACKET, "Packet[DD]: Neighbor %s: T-bit on?",
inet_ntoa(nbr->router_id));
return;
}
@ -1949,15 +1947,15 @@ static void ospf_ls_upd(struct ospf *ospf, struct ip *iph,
char buf3[INET_ADDRSTRLEN];
flog_err(EC_OSPF_ROUTER_LSA_MISMATCH,
"Incoming Router-LSA from %s with "
"Adv-ID[%s] != LS-ID[%s]",
inet_ntop(AF_INET, &ospfh->router_id,
buf1, INET_ADDRSTRLEN),
inet_ntop(AF_INET, &lsa->data->id,
buf2, INET_ADDRSTRLEN),
inet_ntop(AF_INET,
&lsa->data->adv_router,
buf3, INET_ADDRSTRLEN));
"Incoming Router-LSA from %s with "
"Adv-ID[%s] != LS-ID[%s]",
inet_ntop(AF_INET, &ospfh->router_id,
buf1, INET_ADDRSTRLEN),
inet_ntop(AF_INET, &lsa->data->id,
buf2, INET_ADDRSTRLEN),
inet_ntop(AF_INET,
&lsa->data->adv_router, buf3,
INET_ADDRSTRLEN));
flog_err(
EC_OSPF_DOMAIN_CORRUPT,
"OSPF domain compromised by attack or corruption. "

View File

@ -1114,17 +1114,17 @@ void ospf_sr_ri_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! can't create SR node in hash table",
__func__);
"SR (%s): Abort! can't create SR node in hash table",
__func__);
return;
}
if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) {
flog_err(EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong "
"LSA ID 4.0.0.%u for SR node %s/%u",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router), srn->instance);
"SR (%s): Abort! Wrong "
"LSA ID 4.0.0.%u for SR node %s/%u",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router), srn->instance);
return;
}
@ -1225,17 +1225,16 @@ void ospf_sr_ri_lsa_delete(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! no entry in SRDB for SR Node %s",
__func__, inet_ntoa(lsah->adv_router));
"SR (%s): Abort! no entry in SRDB for SR Node %s",
__func__, inet_ntoa(lsah->adv_router));
return;
}
if ((srn->instance != 0) && (srn->instance != ntohl(lsah->id.s_addr))) {
flog_err(
EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %s",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router));
flog_err(EC_OSPF_SR_INVALID_LSA_ID,
"SR (%s): Abort! Wrong LSA ID 4.0.0.%u for SR node %s",
__func__, GET_OPAQUE_ID(ntohl(lsah->id.s_addr)),
inet_ntoa(lsah->adv_router));
return;
}
@ -1274,8 +1273,8 @@ void ospf_sr_ext_link_lsa_update(struct ospf_lsa *lsa)
/* Sanity check */
if (srn == NULL) {
flog_err(EC_OSPF_SR_NODE_CREATE,
"SR (%s): Abort! can't create SR node in hash table",
__func__);
"SR (%s): Abort! can't create SR node in hash table",
__func__);
return;
}

View File

@ -519,7 +519,7 @@ static void pim_msdp_sa_local_del_on_up_del(struct pim_instance *pim,
* changes; perhaps
* address this in the next release? - XXX */
flog_err(
EC_LIB_DEVELOPMENT,
EC_LIB_DEVELOPMENT,
"MSDP sa %s SPT teardown is causing the local entry to be removed",
sa->sg_str);
return;

View File

@ -485,8 +485,8 @@ static void pim_msdp_pkt_sa_rx_one(struct pim_msdp_peer *mp, struct in_addr rp)
if (prefix_len != 32) {
/* ignore SA update if the prefix length is not 32 */
flog_err(EC_PIM_MSDP_PACKET,
"rxed sa update with invalid prefix length %d",
prefix_len);
"rxed sa update with invalid prefix length %d",
prefix_len);
return;
}
if (PIM_DEBUG_MSDP_PACKETS) {

View File

@ -74,8 +74,8 @@ static int pim_msdp_sock_accept(struct thread *thread)
/* re-register accept thread */
accept_sock = THREAD_FD(thread);
if (accept_sock < 0) {
flog_err(EC_LIB_DEVELOPMENT,
"accept_sock is negative value %d", accept_sock);
flog_err(EC_LIB_DEVELOPMENT, "accept_sock is negative value %d",
accept_sock);
return -1;
}
pim->msdp.listener.thread = NULL;
@ -96,8 +96,8 @@ static int pim_msdp_sock_accept(struct thread *thread)
++pim->msdp.rejected_accepts;
if (PIM_DEBUG_MSDP_EVENTS) {
flog_err(EC_PIM_MSDP_PACKET,
"msdp peer connection refused from %s",
sockunion2str(&su, buf, SU_ADDRSTRLEN));
"msdp peer connection refused from %s",
sockunion2str(&su, buf, SU_ADDRSTRLEN));
}
close(msdp_sock);
return -1;
@ -141,8 +141,7 @@ int pim_msdp_sock_listen(struct pim_instance *pim)
sock = socket(AF_INET, SOCK_STREAM, 0);
if (sock < 0) {
flog_err_sys(EC_LIB_SOCKET, "socket: %s",
safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "socket: %s", safe_strerror(errno));
return sock;
}
@ -162,8 +161,8 @@ int pim_msdp_sock_listen(struct pim_instance *pim)
if_lookup_by_name(pim->vrf->name, pim->vrf_id);
if (!ifp) {
flog_err(EC_LIB_INTERFACE,
"%s: Unable to lookup vrf interface: %s",
__PRETTY_FUNCTION__, pim->vrf->name);
"%s: Unable to lookup vrf interface: %s",
__PRETTY_FUNCTION__, pim->vrf->name);
close(sock);
return -1;
}
@ -243,8 +242,8 @@ int pim_msdp_sock_connect(struct pim_msdp_peer *mp)
if_lookup_by_name(mp->pim->vrf->name, mp->pim->vrf_id);
if (!ifp) {
flog_err(EC_LIB_INTERFACE,
"%s: Unable to lookup vrf interface: %s",
__PRETTY_FUNCTION__, mp->pim->vrf->name);
"%s: Unable to lookup vrf interface: %s",
__PRETTY_FUNCTION__, mp->pim->vrf->name);
return -1;
}
if (pim_socket_bind(mp->fd, ifp)) {

View File

@ -117,8 +117,8 @@ void pim_sock_delete(struct interface *ifp, const char *delete_message)
if (!ifp->info) {
flog_err(EC_PIM_CONFIG,
"%s: %s: but PIM not enabled on interface %s (!)",
__PRETTY_FUNCTION__, delete_message, ifp->name);
"%s: %s: but PIM not enabled on interface %s (!)",
__PRETTY_FUNCTION__, delete_message, ifp->name);
return;
}

View File

@ -114,7 +114,7 @@ void pim_rp_init(struct pim_instance *pim)
if (!str2prefix("224.0.0.0/4", &rp_info->group)) {
flog_err(EC_LIB_DEVELOPMENT,
"Unable to convert 224.0.0.0/4 to prefix");
"Unable to convert 224.0.0.0/4 to prefix");
list_delete_and_null(&pim->rp_list);
route_table_finish(pim->rp_table);
XFREE(MTYPE_PIM_RP, rp_info);

View File

@ -74,8 +74,8 @@ static int pim_is_grp_standard_ssm(struct prefix *group)
if (first) {
if (!str2prefix(PIM_SSM_STANDARD_RANGE, &group_ssm))
flog_err(EC_LIB_DEVELOPMENT,
"%s: Failure to Read Group Address: %s",
__PRETTY_FUNCTION__, PIM_SSM_STANDARD_RANGE);
"%s: Failure to Read Group Address: %s",
__PRETTY_FUNCTION__, PIM_SSM_STANDARD_RANGE);
first = 0;
}

View File

@ -124,7 +124,7 @@ void zclient_lookup_new(void)
zlookup = zclient_new_notify(master, &zclient_options_default);
if (!zlookup) {
flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_new() failure",
__PRETTY_FUNCTION__);
__PRETTY_FUNCTION__);
return;
}
@ -171,8 +171,8 @@ static int zclient_read_nexthop(struct pim_instance *pim,
&version, &vrf_id, &command);
if (err < 0) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: zclient_read_header() failed",
__PRETTY_FUNCTION__);
"%s: zclient_read_header() failed",
__PRETTY_FUNCTION__);
zclient_lookup_failed(zlookup);
return -1;
}
@ -316,8 +316,8 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim,
/* Check socket. */
if (zlookup->sock < 0) {
flog_err(EC_LIB_ZAPI_SOCKET,
"%s: zclient lookup socket is not connected",
__PRETTY_FUNCTION__);
"%s: zclient lookup socket is not connected",
__PRETTY_FUNCTION__);
zclient_lookup_failed(zlookup);
return -1;
}
@ -536,8 +536,8 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil)
&version, &vrf_id, &command);
if (err < 0) {
flog_err(EC_LIB_ZAPI_MISSMATCH,
"%s: zclient_read_header() failed",
__PRETTY_FUNCTION__);
"%s: zclient_read_header() failed",
__PRETTY_FUNCTION__);
zclient_lookup_failed(zlookup);
return -1;
}

View File

@ -24,16 +24,13 @@
#include "rip_errors.h"
static struct log_ref ferr_rip_err[] = {
{
.code = EC_RIP_PACKET,
.title = "RIP Packet Error",
.description = "RIP has detected a packet encode/decode issue",
.suggestion = "Gather log files from both sides and open a Issue"
},
{.code = EC_RIP_PACKET,
.title = "RIP Packet Error",
.description = "RIP has detected a packet encode/decode issue",
.suggestion = "Gather log files from both sides and open a Issue"},
{
.code = END_FERR,
}
};
}};
void rip_error_init(void)
{

View File

@ -1056,9 +1056,10 @@ static void rip_auth_md5_set(struct stream *s, struct rip_interface *ri,
/* Check packet length. */
if (len < (RIP_HEADER_SIZE + RIP_RTE_SIZE)) {
flog_err(EC_RIP_PACKET,
"rip_auth_md5_set(): packet length %ld is less than minimum length.",
len);
flog_err(
EC_RIP_PACKET,
"rip_auth_md5_set(): packet length %ld is less than minimum length.",
len);
return;
}

View File

@ -204,9 +204,8 @@ int ripng_send_packet(caddr_t buf, int bufsize, struct sockaddr_in6 *to,
ifp->name, inet6_ntoa(to->sin6_addr),
safe_strerror(errno));
else
flog_err_sys(EC_LIB_SOCKET,
"RIPng send fail on %s: %s", ifp->name,
safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "RIPng send fail on %s: %s",
ifp->name, safe_strerror(errno));
}
return ret;

View File

@ -494,8 +494,8 @@ static int wakeup_init(struct thread *t_wakeup)
if (try_connect(dmn) < 0) {
SET_WAKEUP_DOWN(dmn);
flog_err(EC_WATCHFRR_CONNECTION,
"%s state -> down : initial connection attempt failed",
dmn->name);
"%s state -> down : initial connection attempt failed",
dmn->name);
dmn->state = DAEMON_DOWN;
}
return 0;
@ -504,8 +504,8 @@ static int wakeup_init(struct thread *t_wakeup)
static void daemon_down(struct daemon *dmn, const char *why)
{
if (IS_UP(dmn) || (dmn->state == DAEMON_INIT))
flog_err(EC_WATCHFRR_CONNECTION,
"%s state -> down : %s", dmn->name, why);
flog_err(EC_WATCHFRR_CONNECTION, "%s state -> down : %s",
dmn->name, why);
else if (gs.loglevel > LOG_DEBUG)
zlog_debug("%s still down : %s", dmn->name, why);
if (IS_UP(dmn))
@ -752,8 +752,8 @@ static int phase_hanging(struct thread *t_hanging)
{
gs.t_phase_hanging = NULL;
flog_err(EC_WATCHFRR_CONNECTION,
"Phase [%s] hanging for %ld seconds, aborting phased restart",
phase_str[gs.phase], PHASE_TIMEOUT);
"Phase [%s] hanging for %ld seconds, aborting phased restart",
phase_str[gs.phase], PHASE_TIMEOUT);
gs.phase = PHASE_NONE;
return 0;
}
@ -868,9 +868,9 @@ static int wakeup_unresponsive(struct thread *t_wakeup)
dmn->t_wakeup = NULL;
if (dmn->state != DAEMON_UNRESPONSIVE)
flog_err(EC_WATCHFRR_CONNECTION,
"%s: no longer unresponsive (now %s), "
"wakeup should have been cancelled!",
dmn->name, state_str[dmn->state]);
"%s: no longer unresponsive (now %s), "
"wakeup should have been cancelled!",
dmn->name, state_str[dmn->state]);
else {
SET_WAKEUP_UNRESPONSIVE(dmn);
try_restart(dmn);
@ -885,9 +885,9 @@ static int wakeup_no_answer(struct thread *t_wakeup)
dmn->t_wakeup = NULL;
dmn->state = DAEMON_UNRESPONSIVE;
flog_err(EC_WATCHFRR_CONNECTION,
"%s state -> unresponsive : no response yet to ping "
"sent %ld seconds ago",
dmn->name, gs.timeout);
"%s state -> unresponsive : no response yet to ping "
"sent %ld seconds ago",
dmn->name, gs.timeout);
SET_WAKEUP_UNRESPONSIVE(dmn);
try_restart(dmn);
return 0;

View File

@ -198,8 +198,8 @@ static int if_getaddrs(void)
ifp = if_lookup_by_name(ifap->ifa_name, VRF_DEFAULT);
if (ifp == NULL) {
flog_err(EC_LIB_INTERFACE,
"if_getaddrs(): Can't lookup interface %s\n",
ifap->ifa_name);
"if_getaddrs(): Can't lookup interface %s\n",
ifap->ifa_name);
continue;
}

View File

@ -314,7 +314,7 @@ static void netlink_vrf_change(struct nlmsghdr *h, struct rtattr *tb,
name); // It would create vrf
if (!vrf) {
flog_err(EC_LIB_INTERFACE, "VRF %s id %u not created",
name, ifi->ifi_index);
name, ifi->ifi_index);
return;
}
@ -336,8 +336,8 @@ static void netlink_vrf_change(struct nlmsghdr *h, struct rtattr *tb,
/* Enable the created VRF. */
if (!vrf_enable(vrf)) {
flog_err(EC_LIB_INTERFACE,
"Failed to enable VRF %s id %u", name,
ifi->ifi_index);
"Failed to enable VRF %s id %u", name,
ifi->ifi_index);
return;
}

View File

@ -43,7 +43,8 @@ int ipforward(void)
len = sizeof ipforwarding;
if (sysctl(mib, MIB_SIZ, &ipforwarding, &len, 0, 0) < 0) {
flog_err_sys(EC_LIB_SYSTEM_CALL, "Can't get ipforwarding value");
flog_err_sys(EC_LIB_SYSTEM_CALL,
"Can't get ipforwarding value");
return -1;
}
return ipforwarding;

View File

@ -90,8 +90,7 @@ int irdp_sock_init(void)
}
if (sock < 0) {
flog_err_sys(EC_LIB_SOCKET,
"IRDP: can't create irdp socket %s",
flog_err_sys(EC_LIB_SOCKET, "IRDP: can't create irdp socket %s",
safe_strerror(save_errno));
return sock;
};

View File

@ -97,14 +97,14 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
if (len != iplen) {
flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX length doesnt match IP length");
"IRDP: RX length doesnt match IP length");
return;
}
if (iplen < ICMP_MINLEN) {
flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX ICMP packet too short from %s\n",
inet_ntoa(src));
"IRDP: RX ICMP packet too short from %s\n",
inet_ntoa(src));
return;
}
@ -114,8 +114,8 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
len of IP-header) 14+20 */
if (iplen > IRDP_RX_BUF - 34) {
flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX ICMP packet too long from %s\n",
inet_ntoa(src));
"IRDP: RX ICMP packet too long from %s\n",
inet_ntoa(src));
return;
}

View File

@ -287,9 +287,9 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
* it to be sent up to us
*/
flog_err(EC_ZEBRA_UNKNOWN_NLMSG,
"Unknown netlink nlmsg_type %s(%d) vrf %u\n",
nl_msg_type_to_str(h->nlmsg_type), h->nlmsg_type,
ns_id);
"Unknown netlink nlmsg_type %s(%d) vrf %u\n",
nl_msg_type_to_str(h->nlmsg_type), h->nlmsg_type,
ns_id);
break;
}
return 0;
@ -453,8 +453,7 @@ static void netlink_install_filter(int sock, __u32 pid)
if (setsockopt(sock, SOL_SOCKET, SO_ATTACH_FILTER, &prog, sizeof(prog))
< 0)
flog_err_sys(EC_LIB_SOCKET,
"Can't install socket filter: %s\n",
flog_err_sys(EC_LIB_SOCKET, "Can't install socket filter: %s\n",
safe_strerror(errno));
}
@ -711,8 +710,8 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
if (errno == EWOULDBLOCK || errno == EAGAIN)
break;
flog_err(EC_ZEBRA_RECVMSG_OVERRUN,
"%s recvmsg overrun: %s", nl->name,
safe_strerror(errno));
"%s recvmsg overrun: %s", nl->name,
safe_strerror(errno));
/*
* In this case we are screwed.
* There is no good way to
@ -729,8 +728,8 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
if (msg.msg_namelen != sizeof snl) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s sender address length error: length %d",
nl->name, msg.msg_namelen);
"%s sender address length error: length %d",
nl->name, msg.msg_namelen);
return -1;
}
@ -803,10 +802,9 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
if (h->nlmsg_len
< NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
flog_err(
EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated",
nl->name);
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated",
nl->name);
return -1;
}
@ -901,13 +899,13 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
/* After error care. */
if (msg.msg_flags & MSG_TRUNC) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated", nl->name);
"%s error: message truncated", nl->name);
continue;
}
if (status) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: data remnant size %d", nl->name,
status);
"%s error: data remnant size %d", nl->name,
status);
return -1;
}
}

View File

@ -410,8 +410,8 @@ int ifm_read(struct if_msghdr *ifm)
/* paranoia: sanity check structure */
if (ifm->ifm_msglen < sizeof(struct if_msghdr)) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"ifm_read: ifm->ifm_msglen %d too short\n",
ifm->ifm_msglen);
"ifm_read: ifm->ifm_msglen %d too short\n",
ifm->ifm_msglen);
return -1;
}
@ -1392,8 +1392,7 @@ static void routing_socket(struct zebra_ns *zns)
}
if (routing_sock < 0) {
flog_err_sys(EC_LIB_SOCKET,
"Can't init kernel routing socket");
flog_err_sys(EC_LIB_SOCKET, "Can't init kernel routing socket");
return;
}

View File

@ -84,8 +84,8 @@ static int relay_response_back(void)
&vrf_id, &resp_cmd);
if (ret < 0 && errno != EAGAIN) {
flog_err(EC_ZEBRA_LM_RESPONSE,
"Error reading Label Manager response: %s",
strerror(errno));
"Error reading Label Manager response: %s",
strerror(errno));
return -1;
}
zlog_debug("Label Manager response received, %d bytes", size);
@ -120,8 +120,8 @@ static int relay_response_back(void)
ret = writen(zserv->sock, dst->data, stream_get_endp(dst));
if (ret <= 0) {
flog_err(EC_ZEBRA_LM_RELAY_FAILED,
"Error relaying LM response to %s instance %u: %s",
proto_str, instance, strerror(errno));
"Error relaying LM response to %s instance %u: %s",
proto_str, instance, strerror(errno));
return -1;
}
zlog_debug("Relayed LM response (%d bytes) to %s instance %u", ret,
@ -188,7 +188,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
if (zclient->sock < 0) {
flog_err(EC_ZEBRA_LM_NO_SOCKET,
"Unable to relay LM request: no socket");
"Unable to relay LM request: no socket");
reply_error(cmd, zserv, vrf_id);
return -1;
}
@ -218,8 +218,8 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
/* check & set client instance if unset */
if (zserv->instance && zserv->instance != instance) {
flog_err(EC_ZEBRA_LM_BAD_INSTANCE,
"Client instance(%u) != msg instance(%u)",
zserv->instance, instance);
"Client instance(%u) != msg instance(%u)",
zserv->instance, instance);
return -1;
}
@ -241,8 +241,8 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
ret = writen(zclient->sock, dst->data, stream_get_endp(dst));
if (ret <= 0) {
flog_err(EC_ZEBRA_LM_RELAY_FAILED,
"Error relaying LM request from %s instance %u: %s",
proto_str, instance, strerror(errno));
"Error relaying LM request from %s instance %u: %s",
proto_str, instance, strerror(errno));
reply_error(cmd, zserv, vrf_id);
return -1;
}
@ -271,7 +271,7 @@ static int lm_zclient_connect(struct thread *t)
if (zclient_socket_connect(zclient) < 0) {
flog_err(EC_ZEBRA_LM_CLIENT_CONNECTION_FAILED,
"Error connecting synchronous zclient!");
"Error connecting synchronous zclient!");
thread_add_timer(zebrad.master, lm_zclient_connect, zclient,
CONNECTION_DELAY, &zclient->t_connect);
return -1;
@ -401,8 +401,8 @@ struct label_manager_chunk *assign_label_chunk(uint8_t proto,
+ 1;
if (lmc->start > MPLS_LABEL_UNRESERVED_MAX - size + 1) {
flog_err(EC_ZEBRA_LM_EXHAUSTED_LABELS,
"Reached max labels. Start: %u, size: %u", lmc->start,
size);
"Reached max labels. Start: %u, size: %u", lmc->start,
size);
XFREE(MTYPE_LM_CHUNK, lmc);
return NULL;
}
@ -441,7 +441,7 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
continue;
if (lmc->proto != proto || lmc->instance != instance) {
flog_err(EC_ZEBRA_LM_DAEMON_MISMATCH,
"%s: Daemon mismatch!!", __func__);
"%s: Daemon mismatch!!", __func__);
continue;
}
lmc->proto = NO_PROTO;
@ -452,7 +452,7 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
}
if (ret != 0)
flog_err(EC_ZEBRA_LM_UNRELEASED_CHUNK,
"%s: Label chunk not released!!", __func__);
"%s: Label chunk not released!!", __func__);
return ret;
}

View File

@ -46,14 +46,14 @@
enum dp_req_result kernel_add_pbr_rule(struct zebra_pbr_rule *rule)
{
flog_err(EC_LIB_UNAVAILABLE, "%s not Implemented for this platform",
__PRETTY_FUNCTION__);
__PRETTY_FUNCTION__);
return DP_REQUEST_FAILURE;
}
enum dp_req_result kernel_del_pbr_rule(struct zebra_pbr_rule *rule)
{
flog_err(EC_LIB_UNAVAILABLE, "%s not Implemented for this platform",
__PRETTY_FUNCTION__);
__PRETTY_FUNCTION__);
return DP_REQUEST_FAILURE;
}

View File

@ -148,8 +148,7 @@ struct table_manager_chunk *assign_table_chunk(uint8_t proto, uint16_t instance,
tmc->start = start;
if (RT_TABLE_ID_UNRESERVED_MAX - size + 1 < start) {
flog_err(EC_ZEBRA_TM_EXHAUSTED_IDS,
"Reached max table id. Start/Size %u/%u", start,
size);
"Reached max table id. Start/Size %u/%u", start, size);
XFREE(MTYPE_TM_CHUNK, tmc);
return NULL;
}
@ -187,7 +186,7 @@ int release_table_chunk(uint8_t proto, uint16_t instance, uint32_t start,
continue;
if (tmc->proto != proto || tmc->instance != instance) {
flog_err(EC_ZEBRA_TM_DAEMON_MISMATCH,
"%s: Daemon mismatch!!", __func__);
"%s: Daemon mismatch!!", __func__);
continue;
}
tmc->proto = NO_PROTO;
@ -197,7 +196,7 @@ int release_table_chunk(uint8_t proto, uint16_t instance, uint32_t start,
}
if (ret != 0)
flog_err(EC_ZEBRA_TM_UNRELEASED_CHUNK,
"%s: Table chunk not released!!", __func__);
"%s: Table chunk not released!!", __func__);
return ret;
}

View File

@ -1787,8 +1787,8 @@ static void zread_table_manager_connect(struct zserv *client,
/* accept only dynamic routing protocols */
if ((proto >= ZEBRA_ROUTE_MAX) || (proto <= ZEBRA_ROUTE_STATIC)) {
flog_err(EC_ZEBRA_TM_WRONG_PROTO,
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
zsend_table_manager_connect_response(client, vrf_id, 1);
return;
}
@ -1827,8 +1827,8 @@ static void zread_label_manager_connect(struct zserv *client,
/* accept only dynamic routing protocols */
if ((proto >= ZEBRA_ROUTE_MAX) || (proto <= ZEBRA_ROUTE_STATIC)) {
flog_err(EC_ZEBRA_TM_WRONG_PROTO,
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
zsend_label_manager_connect_response(client, vrf_id, 1);
return;
}
@ -1857,8 +1857,8 @@ static int msg_client_id_mismatch(const char *op, struct zserv *client,
{
if (proto != client->proto) {
flog_err(EC_ZEBRA_PROTO_OR_INSTANCE_MISMATCH,
"%s: msg vs client proto mismatch, client=%u msg=%u",
op, client->proto, proto);
"%s: msg vs client proto mismatch, client=%u msg=%u",
op, client->proto, proto);
/* TODO: fail when BGP sets proto and instance */
/* return 1; */
}
@ -1989,8 +1989,8 @@ static void zread_get_table_chunk(struct zserv *client, struct stream *msg,
tmc = assign_table_chunk(client->proto, client->instance, size);
if (!tmc)
flog_err(EC_ZEBRA_TM_CANNOT_ASSIGN_CHUNK,
"%s: Unable to assign Table Chunk of size %u",
__func__, size);
"%s: Unable to assign Table Chunk of size %u",
__func__, size);
else
zlog_debug("Assigned Table Chunk %u - %u", tmc->start,
tmc->end);

View File

@ -1518,9 +1518,8 @@ static inline void zfpm_init_message_format(const char *format)
if (!strcmp("netlink", format)) {
if (!have_netlink) {
flog_err(
EC_ZEBRA_NETLINK_NOT_AVAILABLE,
"FPM netlink message format is not available");
flog_err(EC_ZEBRA_NETLINK_NOT_AVAILABLE,
"FPM netlink message format is not available");
return;
}
zfpm_g->message_format = ZFPM_MSG_FORMAT_NETLINK;

View File

@ -1056,7 +1056,7 @@ static int lsp_processq_add(zebra_lsp_t *lsp)
if (zebrad.lsp_process_q == NULL) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: work_queue does not exist!", __func__);
"%s: work_queue does not exist!", __func__);
return -1;
}
@ -1699,7 +1699,7 @@ static int mpls_processq_init(struct zebra_t *zebra)
zebra->lsp_process_q = work_queue_new(zebra->master, "LSP processing");
if (!zebra->lsp_process_q) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise work queue!", __func__);
"%s: could not initialise work queue!", __func__);
return -1;
}
@ -1918,8 +1918,8 @@ int zebra_mpls_fec_unregister(struct zebra_vrf *zvrf, struct prefix *p,
if (!fec) {
prefix2str(p, buf, BUFSIZ);
flog_err(EC_ZEBRA_FEC_RM_FAILED,
"Failed to find FEC %s upon unregister, client %s",
buf, zebra_route_string(client->proto));
"Failed to find FEC %s upon unregister, client %s",
buf, zebra_route_string(client->proto));
return -1;
}
@ -2050,7 +2050,7 @@ int zebra_mpls_static_fec_add(struct zebra_vrf *zvrf, struct prefix *p,
if (!fec) {
prefix2str(p, buf, BUFSIZ);
flog_err(EC_ZEBRA_FEC_ADD_FAILED,
"Failed to add FEC %s upon config", buf);
"Failed to add FEC %s upon config", buf);
return -1;
}
@ -2098,7 +2098,7 @@ int zebra_mpls_static_fec_del(struct zebra_vrf *zvrf, struct prefix *p)
if (!fec) {
prefix2str(p, buf, BUFSIZ);
flog_err(EC_ZEBRA_FEC_RM_FAILED,
"Failed to find FEC %s upon delete", buf);
"Failed to find FEC %s upon delete", buf);
return -1;
}

View File

@ -116,7 +116,7 @@ static int send_receive(int sock, struct nlmsghdr *nlh, unsigned int seq,
}
if (msg.msg_flags & MSG_TRUNC) {
flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"netlink recvmsg : error message truncated");
"netlink recvmsg : error message truncated");
return -1;
}
/* nlh already points to buf */

View File

@ -181,8 +181,8 @@ static int zebra_ptm_flush_messages(struct thread *thread)
switch (buffer_flush_available(ptm_cb.wb, ptm_cb.ptm_sock)) {
case BUFFER_ERROR:
flog_err_sys(EC_LIB_SOCKET, "%s ptm socket error: %s",
__func__, safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "%s ptm socket error: %s", __func__,
safe_strerror(errno));
close(ptm_cb.ptm_sock);
ptm_cb.ptm_sock = -1;
zebra_ptm_reset_status(0);
@ -207,8 +207,8 @@ static int zebra_ptm_send_message(char *data, int size)
errno = 0;
switch (buffer_write(ptm_cb.wb, ptm_cb.ptm_sock, data, size)) {
case BUFFER_ERROR:
flog_err_sys(EC_LIB_SOCKET, "%s ptm socket error: %s",
__func__, safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "%s ptm socket error: %s", __func__,
safe_strerror(errno));
close(ptm_cb.ptm_sock);
ptm_cb.ptm_sock = -1;
zebra_ptm_reset_status(0);
@ -506,7 +506,7 @@ static int zebra_ptm_handle_bfd_msg(void *arg, void *in_ctxt,
if (str2prefix(dest_str, &dest_prefix) == 0) {
flog_err(EC_ZEBRA_PREFIX_PARSE_ERROR,
"%s: Peer addr %s not found", __func__, dest_str);
"%s: Peer addr %s not found", __func__, dest_str);
return -1;
}
@ -514,8 +514,8 @@ static int zebra_ptm_handle_bfd_msg(void *arg, void *in_ctxt,
if (strcmp(ZEBRA_PTM_INVALID_SRC_IP, src_str)) {
if (str2prefix(src_str, &src_prefix) == 0) {
flog_err(EC_ZEBRA_PREFIX_PARSE_ERROR,
"%s: Local addr %s not found", __func__,
src_str);
"%s: Local addr %s not found", __func__,
src_str);
return -1;
}
}

View File

@ -2013,7 +2013,7 @@ void rib_queue_add(struct route_node *rn)
if (zebrad.ribq == NULL) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: work_queue does not exist!", __func__);
"%s: work_queue does not exist!", __func__);
return;
}
@ -2069,7 +2069,7 @@ static void rib_queue_init(struct zebra_t *zebra)
if (!(zebra->ribq =
work_queue_new(zebra->master, "route_node processing"))) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise work queue!", __func__);
"%s: could not initialise work queue!", __func__);
return;
}
@ -2083,7 +2083,7 @@ static void rib_queue_init(struct zebra_t *zebra)
if (!(zebra->mq = meta_queue_new())) {
flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise meta queue!", __func__);
"%s: could not initialise meta queue!", __func__);
return;
}
return;
@ -2334,8 +2334,8 @@ void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id);
if (!table) {
flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
return;
}
@ -2382,8 +2382,8 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
return;
}

View File

@ -872,8 +872,8 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
break;
default:
flog_err(EC_ZEBRA_RNH_UNKNOWN_FAMILY,
"%s: Unknown family (%d) notification attempted\n",
__FUNCTION__, rn->p.family);
"%s: Unknown family (%d) notification attempted\n",
__FUNCTION__, rn->p.family);
break;
}
if (re) {

View File

@ -1773,9 +1773,9 @@ static int zvni_gw_macip_add(struct interface *ifp, zebra_vni_t *zvni,
mac = zvni_mac_add(zvni, macaddr);
if (!mac) {
flog_err(EC_ZEBRA_MAC_ADD_FAILED,
"Failed to add MAC %s intf %s(%u) VID %u",
prefix_mac2str(macaddr, buf, sizeof(buf)),
ifp->name, ifp->ifindex, vxl->access_vlan);
"Failed to add MAC %s intf %s(%u) VID %u",
prefix_mac2str(macaddr, buf, sizeof(buf)),
ifp->name, ifp->ifindex, vxl->access_vlan);
return -1;
}
}
@ -3934,8 +3934,8 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni,
/* Delete the hash entry. */
if (zvni_del(zvni)) {
flog_err(EC_ZEBRA_VNI_DEL_FAILED,
"Failed to del VNI hash %p, VNI %u", zvni,
zvni->vni);
"Failed to del VNI hash %p, VNI %u", zvni,
zvni->vni);
return -1;
}
} else {
@ -6049,8 +6049,8 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
if (zvni_vtep_add(zvni, &vtep_ip) == NULL) {
flog_err(EC_ZEBRA_VTEP_ADD_FAILED,
"Failed to add remote VTEP, VNI %u zvni %p",
vni, zvni);
"Failed to add remote VTEP, VNI %u zvni %p",
vni, zvni);
continue;
}
@ -6470,8 +6470,8 @@ int zebra_vxlan_if_del(struct interface *ifp)
/* Delete the hash entry. */
if (zvni_del(zvni)) {
flog_err(EC_ZEBRA_VNI_DEL_FAILED,
"Failed to del VNI hash %p, IF %s(%u) VNI %u",
zvni, ifp->name, ifp->ifindex, zvni->vni);
"Failed to del VNI hash %p, IF %s(%u) VNI %u",
zvni, ifp->name, ifp->ifindex, zvni->vni);
return -1;
}
}

View File

@ -798,9 +798,8 @@ void zserv_start(char *path)
ret = bind(zebrad.sock, (struct sockaddr *)&sa, sa_len);
}
if (ret < 0) {
flog_err_sys(EC_LIB_SOCKET,
"Can't bind zserv socket on %s: %s", path,
safe_strerror(errno));
flog_err_sys(EC_LIB_SOCKET, "Can't bind zserv socket on %s: %s",
path, safe_strerror(errno));
close(zebrad.sock);
zebrad.sock = -1;
return;