#endif
break;
default:
- flog_warn(ZEBRA_ERR_CONNECTED_AFI_UNKNOWN,
+ flog_warn(EC_ZEBRA_CONNECTED_AFI_UNKNOWN,
"Received unknown AFI: %s", afi2str(afi));
return;
break;
if (CONNECTED_PEER(ifc)) {
if (IPV4_ADDR_SAME(addr, broad))
flog_warn(
- ZEBRA_ERR_IFACE_SAME_LOCAL_AS_PEER,
+ EC_ZEBRA_IFACE_SAME_LOCAL_AS_PEER,
"warning: interface %s has same local and peer "
"address %s, routing protocols may malfunction",
ifp->name, inet_ntoa(*addr));
bcalc.s_addr = ipv4_broadcast_addr(addr->s_addr,
prefixlen);
flog_warn(
- ZEBRA_ERR_BCAST_ADDR_MISMATCH,
+ EC_ZEBRA_BCAST_ADDR_MISMATCH,
"warning: interface %s broadcast addr %s/%d != "
"calculated %s, routing protocols may malfunction",
ifp->name,
vrf = vrf_lookup_by_id((vrf_id_t)ifi->ifi_index);
if (!vrf) {
- flog_warn(ZEBRA_ERR_VRF_NOT_FOUND, "%s: vrf not found",
+ flog_warn(EC_ZEBRA_VRF_NOT_FOUND, "%s: vrf not found",
__func__);
return;
}
if (ifa->ifa_family != AF_INET && ifa->ifa_family != AF_INET6) {
flog_warn(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"Invalid address family: %u received from kernel interface addr change: %u",
ifa->ifa_family, h->nlmsg_type);
return 0;
if (!(ifi->ifi_family == AF_UNSPEC || ifi->ifi_family == AF_BRIDGE
|| ifi->ifi_family == AF_INET6)) {
flog_warn(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"Invalid address family: %u received from kernel link change: %u",
ifi->ifi_family, h->nlmsg_type);
return 0;
/* Query buffer size. */
if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl() error by %s",
+ flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl() error by %s",
safe_strerror(errno));
return;
}
/* Fetch interface informations into allocated buffer. */
if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl error by %s",
+ flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl error by %s",
safe_strerror(errno));
XFREE(MTYPE_TMP, ref);
return;
/* Query buffer size. */
if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) {
- flog_err_sys(ZEBRA_ERR_IFLIST_FAILED,
+ flog_err_sys(EC_ZEBRA_IFLIST_FAILED,
"Could not enumerate interfaces: %s",
safe_strerror(errno));
return;
/* Fetch interface informations into allocated buffer. */
if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) {
- flog_err_sys(ZEBRA_ERR_IFLIST_FAILED,
+ flog_err_sys(EC_ZEBRA_IFLIST_FAILED,
"Could not enumerate interfaces: %s",
safe_strerror(errno));
return;
/* Get address derived subnet node. */
rn = route_node_lookup(zebra_if->ipv4_subnets, &cp);
if (!(rn && rn->info)) {
- flog_warn(ZEBRA_ERR_REMOVE_ADDR_UNKNOWN_SUBNET,
+ flog_warn(EC_ZEBRA_REMOVE_ADDR_UNKNOWN_SUBNET,
"Trying to remove an address from an unknown subnet."
" (please report this bug)");
return -1;
* is unknown. */
if (!listnode_lookup(addr_list, ifc)) {
flog_warn(
- ZEBRA_ERR_REMOVE_UNREGISTERED_ADDR,
+ EC_ZEBRA_REMOVE_UNREGISTERED_ADDR,
"Trying to remove an address from a subnet where it is not"
" currently registered. (please report this bug)");
return -1;
ret = if_set_prefix(ifp, ifc);
if (ret < 0) {
flog_err_sys(
- ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
+ EC_ZEBRA_IFACE_ADDR_ADD_FAILED,
"Can't set interface's address: %s",
safe_strerror(errno));
continue;
ret = if_prefix_add_ipv6(ifp, ifc);
if (ret < 0) {
flog_err_sys(
- ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
+ EC_ZEBRA_IFACE_ADDR_ADD_FAILED,
"Can't set interface's address: %s",
safe_strerror(errno));
continue;
/* Notify the protocol daemons. */
if (ifp->ptm_enable && (ifp->ptm_status == ZEBRA_PTM_STATUS_DOWN)) {
- flog_warn(ZEBRA_ERR_PTM_NOT_READY,
+ flog_warn(EC_ZEBRA_PTM_NOT_READY,
"%s: interface %s hasn't passed ptm check\n",
__func__, ifp->name);
return;
p = irdp_get_prefix(ifp);
if (!p) {
- flog_warn(ZEBRA_ERR_NO_IFACE_ADDR,
+ flog_warn(EC_ZEBRA_NO_IFACE_ADDR,
"IRDP: can't get address for %s", ifp->name);
return 1;
}
return;
}
if ((irdp_sock < 0) && ((irdp_sock = irdp_sock_init()) < 0)) {
- flog_warn(ZEBRA_ERR_IRDP_CANNOT_ACTIVATE_IFACE,
+ flog_warn(EC_ZEBRA_IRDP_CANNOT_ACTIVATE_IFACE,
"IRDP: Cannot activate interface %s (cannot create "
"IRDP socket)",
ifp->name);
if_add_update(ifp);
if (!(ifp->flags & IFF_UP)) {
- flog_warn(ZEBRA_ERR_IRDP_IFACE_DOWN,
+ flog_warn(EC_ZEBRA_IRDP_IFACE_DOWN,
"IRDP: Interface is down %s", ifp->name);
}
if_add_group(ifp);
if (!(ifp->flags & (IFF_MULTICAST | IFF_ALLMULTI))) {
- flog_warn(ZEBRA_ERR_IRDP_IFACE_MCAST_DISABLED,
+ flog_warn(EC_ZEBRA_IRDP_IFACE_MCAST_DISABLED,
"IRDP: Interface not multicast enabled %s",
ifp->name);
}
src = ip->ip_src;
if (len != iplen) {
- flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX length doesnt match IP length");
return;
}
if (iplen < ICMP_MINLEN) {
- flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX ICMP packet too short from %s\n",
inet_ntoa(src));
return;
+
len of IP-header) 14+20 */
if (iplen > IRDP_RX_BUF - 34) {
- flog_err(ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ flog_err(EC_ZEBRA_IRDP_LEN_MISMATCH,
"IRDP: RX ICMP packet too long from %s\n",
inet_ntoa(src));
return;
/* check icmp checksum */
if (in_cksum(icmp, datalen) != icmp->checksum) {
flog_warn(
- ZEBRA_ERR_IRDP_BAD_CHECKSUM,
+ EC_ZEBRA_IRDP_BAD_CHECKSUM,
"IRDP: RX ICMP packet from %s. Bad checksum, silently ignored",
inet_ntoa(src));
return;
return;
if (icmp->code != 0) {
- flog_warn(ZEBRA_ERR_IRDP_BAD_TYPE_CODE,
+ flog_warn(EC_ZEBRA_IRDP_BAD_TYPE_CODE,
"IRDP: RX packet type %d from %s. Bad ICMP type code,"
" silently ignored",
icmp->type, inet_ntoa(src));
|| (ntohl(ip->ip_dst.s_addr) == INADDR_ALLRTRS_GROUP
&& !(irdp->flags & IF_BROADCAST))) {
flog_warn(
- ZEBRA_ERR_IRDP_BAD_RX_FLAGS,
+ EC_ZEBRA_IRDP_BAD_RX_FLAGS,
"IRDP: RX illegal from %s to %s while %s operates in %s; Please correct settings\n",
inet_ntoa(src),
ntohl(ip->ip_dst.s_addr) == INADDR_ALLRTRS_GROUP
default:
flog_warn(
- ZEBRA_ERR_IRDP_BAD_TYPE,
+ EC_ZEBRA_IRDP_BAD_TYPE,
"IRDP: RX type %d from %s. Bad ICMP type, silently ignored",
icmp->type, inet_ntoa(src));
}
* this message type or not ask for
* it to be sent up to us
*/
- flog_err(ZEBRA_ERR_UNKNOWN_NLMSG,
+ 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);
if (is_err)
zlog_err("Extended Error: %s", msg);
else
- flog_warn(ZEBRA_ERR_NETLINK_EXTENDED_WARNING,
+ flog_warn(EC_ZEBRA_NETLINK_EXTENDED_WARNING,
"Extended Warning: %s", msg);
}
}
continue;
if (errno == EWOULDBLOCK || errno == EAGAIN)
break;
- flog_err(ZEBRA_ERR_RECVMSG_OVERRUN,
+ flog_err(EC_ZEBRA_RECVMSG_OVERRUN,
"%s recvmsg overrun: %s", nl->name,
safe_strerror(errno));
/*
}
if (msg.msg_namelen != sizeof snl) {
- flog_err(ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s sender address length error: length %d",
nl->name, msg.msg_namelen);
return -1;
if (h->nlmsg_len
< NLMSG_LENGTH(sizeof(struct nlmsgerr))) {
flog_err(
- ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated",
nl->name);
return -1;
err->msg.nlmsg_pid);
} else
flog_err(
- ZEBRA_ERR_UNEXPECTED_MESSAGE,
+ EC_ZEBRA_UNEXPECTED_MESSAGE,
"%s error: %s, type=%s(%u), seq=%u, pid=%u",
nl->name,
safe_strerror(-errnum),
/* After error care. */
if (msg.msg_flags & MSG_TRUNC) {
- flog_err(ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: message truncated", nl->name);
continue;
}
if (status) {
- flog_err(ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"%s error: data remnant size %d", nl->name,
status);
return -1;
/* paranoia: sanity check structure */
if (ifm->ifm_msglen < sizeof(struct if_msghdr)) {
- flog_err(ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"ifm_read: ifm->ifm_msglen %d too short\n",
ifm->ifm_msglen);
return -1;
ifam_read_mesg(ifam, &addr, &mask, &brd, ifname, &ifnlen);
if ((ifp = if_lookup_by_index(ifam->ifam_index, VRF_DEFAULT)) == NULL) {
- flog_warn(ZEBRA_ERR_UNKNOWN_INTERFACE,
+ flog_warn(EC_ZEBRA_UNKNOWN_INTERFACE,
"%s: no interface for ifname %s, index %d", __func__,
ifname, ifam->ifam_index);
return -1;
/* rt_msghdr version check. */
if (rtm->rtm_version != RTM_VERSION)
- flog_warn(ZEBRA_ERR_RTM_VERSION_MISMATCH,
+ flog_warn(EC_ZEBRA_RTM_VERSION_MISMATCH,
"Routing message version different %d should be %d."
"This may cause problem\n",
rtm->rtm_version, RTM_VERSION);
inet_ntop(AF_INET, &mask->sin.sin_addr,
mask_buf, INET_ADDRSTRLEN);
flog_warn(
- ZEBRA_ERR_RTM_NO_GATEWAY,
+ EC_ZEBRA_RTM_NO_GATEWAY,
"%s: %s/%s: gate == NULL and no gateway found for ifindex %d",
__func__, dest_buf, mask_buf, index);
return -1;
ret = zclient_read_header(src, zclient->sock, &size, &marker, &version,
&vrf_id, &resp_cmd);
if (ret < 0 && errno != EAGAIN) {
- flog_err(ZEBRA_ERR_LM_RESPONSE,
+ flog_err(EC_ZEBRA_LM_RESPONSE,
"Error reading Label Manager response: %s",
strerror(errno));
return -1;
zserv = zserv_find_client(proto, instance);
if (!zserv) {
flog_err(
- ZEBRA_ERR_LM_NO_SUCH_CLIENT,
+ EC_ZEBRA_LM_NO_SUCH_CLIENT,
"Error relaying LM response: can't find client %s, instance %u",
proto_str, instance);
return -1;
/* send response back */
ret = writen(zserv->sock, dst->data, stream_get_endp(dst));
if (ret <= 0) {
- flog_err(ZEBRA_ERR_LM_RELAY_FAILED,
+ flog_err(EC_ZEBRA_LM_RELAY_FAILED,
"Error relaying LM response to %s instance %u: %s",
proto_str, instance, strerror(errno));
return -1;
unsigned short instance;
if (zclient->sock < 0) {
- flog_err(ZEBRA_ERR_LM_NO_SOCKET,
+ flog_err(EC_ZEBRA_LM_NO_SOCKET,
"Unable to relay LM request: no socket");
reply_error(cmd, zserv, vrf_id);
return -1;
/* check & set client proto if unset */
if (zserv->proto && zserv->proto != proto) {
- flog_warn(ZEBRA_WARNING_LM_PROTO_MISMATCH,
+ flog_warn(EC_ZEBRAING_LM_PROTO_MISMATCH,
"Client proto(%u) != msg proto(%u)", zserv->proto,
proto);
return -1;
/* check & set client instance if unset */
if (zserv->instance && zserv->instance != instance) {
- flog_err(ZEBRA_ERR_LM_BAD_INSTANCE,
+ flog_err(EC_ZEBRA_LM_BAD_INSTANCE,
"Client instance(%u) != msg instance(%u)",
zserv->instance, instance);
return -1;
/* Send request to external label manager */
ret = writen(zclient->sock, dst->data, stream_get_endp(dst));
if (ret <= 0) {
- flog_err(ZEBRA_ERR_LM_RELAY_FAILED,
+ flog_err(EC_ZEBRA_LM_RELAY_FAILED,
"Error relaying LM request from %s instance %u: %s",
proto_str, instance, strerror(errno));
reply_error(cmd, zserv, vrf_id);
return 0;
if (zclient_socket_connect(zclient) < 0) {
- flog_err(ZEBRA_ERR_LM_CLIENT_CONNECTION_FAILED,
+ flog_err(EC_ZEBRA_LM_CLIENT_CONNECTION_FAILED,
"Error connecting synchronous zclient!");
thread_add_timer(zebrad.master, lm_zclient_connect, zclient,
CONNECTION_DELAY, &zclient->t_connect);
->end
+ 1;
if (lmc->start > MPLS_LABEL_UNRESERVED_MAX - size + 1) {
- flog_err(ZEBRA_ERR_LM_EXHAUSTED_LABELS,
+ flog_err(EC_ZEBRA_LM_EXHAUSTED_LABELS,
"Reached max labels. Start: %u, size: %u", lmc->start,
size);
XFREE(MTYPE_LM_CHUNK, lmc);
if (lmc->end != end)
continue;
if (lmc->proto != proto || lmc->instance != instance) {
- flog_err(ZEBRA_ERR_LM_DAEMON_MISMATCH,
+ flog_err(EC_ZEBRA_LM_DAEMON_MISMATCH,
"%s: Daemon mismatch!!", __func__);
continue;
}
break;
}
if (ret != 0)
- flog_err(ZEBRA_ERR_LM_UNRELEASED_CHUNK,
+ flog_err(EC_ZEBRA_LM_UNRELEASED_CHUNK,
"%s: Label chunk not released!!", __func__);
return ret;
if (multipath_num > MULTIPATH_NUM
|| multipath_num <= 0) {
flog_err(
- ZEBRA_ERR_BAD_MULTIPATH_NUM,
+ EC_ZEBRA_BAD_MULTIPATH_NUM,
"Multipath Number specified must be less than %d and greater than 0",
MULTIPATH_NUM);
return 1;
afi = family2afi(p->family);
if (!afi) {
- flog_warn(ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
+ flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
"%s: Unknown AFI/SAFI prefix received\n",
__FUNCTION__);
return;
afi = family2afi(p->family);
if (!afi) {
- flog_warn(ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
+ flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
"%s: Unknown AFI/SAFI prefix received\n",
__FUNCTION__);
return;
zebra_route_string(type), zvrf_id(zvrf), instance);
if (afi == 0 || afi >= AFI_MAX) {
- flog_warn(ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
+ flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
"%s: Specified afi %d does not exist",
__PRETTY_FUNCTION__, afi);
return;
STREAM_GETW(msg, instance);
if (afi == 0 || afi >= AFI_MAX) {
- flog_warn(ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
+ flog_warn(EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
"%s: Specified afi %d does not exist",
__PRETTY_FUNCTION__, afi);
return;
if (!CHECK_FLAG(ifc->conf, ZEBRA_IFC_REAL))
flog_warn(
- ZEBRA_ERR_ADVERTISING_UNUSABLE_ADDR,
+ EC_ZEBRA_ADVERTISING_UNUSABLE_ADDR,
"WARNING: advertising address to clients that is not yet usable.");
zebra_vxlan_add_del_gw_macip(ifp, ifc->address, 1);
if (rtm->rtm_src_len != 0) {
char buf[PREFIX_STRLEN];
flog_warn(
- ZEBRA_ERR_UNSUPPORTED_V4_SRCDEST,
+ EC_ZEBRA_UNSUPPORTED_V4_SRCDEST,
"unsupported IPv4 sourcedest route (dest %s vrf %u)",
prefix2str(&p, buf, sizeof(buf)), vrf_id);
return 0;
nh_vrf_id = ifp->vrf_id;
else {
flog_warn(
- ZEBRA_ERR_UNKNOWN_INTERFACE,
+ EC_ZEBRA_UNKNOWN_INTERFACE,
"%s: Unknown interface %u specified, defaulting to VRF_DEFAULT",
__PRETTY_FUNCTION__,
index);
if (!(rtm->rtm_family == AF_INET || rtm->rtm_family == AF_INET6)) {
flog_warn(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"Invalid address family: %u received from kernel route change: %u",
rtm->rtm_family, h->nlmsg_type);
return 0;
return netlink_ipneigh_change(h, len, ns_id);
else {
flog_warn(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"Invalid address family: %u received from kernel neighbor change: %u",
ndm->ndm_family, h->nlmsg_type);
return 0;
struct sockaddr_mpls *smpls)
{
if (nh_label->num_labels > 1) {
- flog_warn(ZEBRA_ERR_MAX_LABELS_PUSH,
+ flog_warn(EC_ZEBRA_MAX_LABELS_PUSH,
"%s: can't push %u labels at "
"once (maximum is 1)",
__func__, nh_label->num_labels);
int route = 0;
if (src_p && src_p->prefixlen) {
- flog_warn(ZEBRA_ERR_UNSUPPORTED_V6_SRCDEST,
+ flog_warn(EC_ZEBRA_UNSUPPORTED_V6_SRCDEST,
"%s: IPv6 sourcedest routes unsupported!", __func__);
return DP_REQUEST_FAILURE;
}
if ((radvert->nd_ra_curhoplimit && zif->rtadv.AdvCurHopLimit)
&& (radvert->nd_ra_curhoplimit != zif->rtadv.AdvCurHopLimit)) {
flog_warn(
- ZEBRA_ERR_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
"%s(%u): Rx RA - our AdvCurHopLimit doesn't agree with %s",
ifp->name, ifp->ifindex, addr_str);
}
if ((radvert->nd_ra_flags_reserved & ND_RA_FLAG_MANAGED)
&& !zif->rtadv.AdvManagedFlag) {
flog_warn(
- ZEBRA_ERR_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
"%s(%u): Rx RA - our AdvManagedFlag doesn't agree with %s",
ifp->name, ifp->ifindex, addr_str);
}
if ((radvert->nd_ra_flags_reserved & ND_RA_FLAG_OTHER)
&& !zif->rtadv.AdvOtherConfigFlag) {
flog_warn(
- ZEBRA_ERR_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
"%s(%u): Rx RA - our AdvOtherConfigFlag doesn't agree with %s",
ifp->name, ifp->ifindex, addr_str);
}
&& (ntohl(radvert->nd_ra_reachable)
!= zif->rtadv.AdvReachableTime)) {
flog_warn(
- ZEBRA_ERR_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
"%s(%u): Rx RA - our AdvReachableTime doesn't agree with %s",
ifp->name, ifp->ifindex, addr_str);
}
&& (ntohl(radvert->nd_ra_retransmit)
!= (unsigned int)zif->rtadv.AdvRetransTimer)) {
flog_warn(
- ZEBRA_ERR_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
"%s(%u): Rx RA - our AdvRetransTimer doesn't agree with %s",
ifp->name, ifp->ifindex, addr_str);
}
/* Interface search. */
ifp = if_lookup_by_index_per_ns(zns, ifindex);
if (ifp == NULL) {
- flog_warn(ZEBRA_ERR_UNKNOWN_INTERFACE,
+ flog_warn(EC_ZEBRA_UNKNOWN_INTERFACE,
"RA/RS received on unknown IF %u from %s", ifindex,
addr_str);
return;
/* Locate interface and check VRF match. */
ifp = if_lookup_by_index_per_ns(zebra_ns_lookup(NS_DEFAULT), ifindex);
if (!ifp) {
- flog_warn(ZEBRA_ERR_UNKNOWN_INTERFACE,
+ flog_warn(EC_ZEBRA_UNKNOWN_INTERFACE,
"%u: IF %u RA %s client %s - interface unknown",
zvrf_id(zvrf), ifindex, enable ? "enable" : "disable",
zebra_route_string(client->proto));
/* Get buffer size. */
if (sysctl(mib, MIBSIZ, NULL, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl fail: %s",
+ flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl fail: %s",
safe_strerror(errno));
return;
}
/* Read routing table information by calling sysctl(). */
if (sysctl(mib, MIBSIZ, buf, &bufsiz, NULL, 0) < 0) {
- flog_warn(ZEBRA_ERR_SYSCTL_FAILED, "sysctl() fail by %s",
+ flog_warn(EC_ZEBRA_SYSCTL_FAILED, "sysctl() fail by %s",
safe_strerror(errno));
XFREE(MTYPE_TMP, ref);
return;
frh = NLMSG_DATA(h);
if (frh->family != AF_INET && frh->family != AF_INET6) {
flog_warn(
- ZEBRA_ERR_NETLINK_INVALID_AF,
+ EC_ZEBRA_NETLINK_INVALID_AF,
"Invalid address family: %u received from kernel rule change: %u",
frh->family, h->nlmsg_type);
return 0;
#endif /* SUNOS_5 */
tmc->start = start;
if (RT_TABLE_ID_UNRESERVED_MAX - size + 1 < start) {
- flog_err(ZEBRA_ERR_TM_EXHAUSTED_IDS,
+ flog_err(EC_ZEBRA_TM_EXHAUSTED_IDS,
"Reached max table id. Start/Size %u/%u", start,
size);
XFREE(MTYPE_TM_CHUNK, tmc);
if (tmc->end != end)
continue;
if (tmc->proto != proto || tmc->instance != instance) {
- flog_err(ZEBRA_ERR_TM_DAEMON_MISMATCH,
+ flog_err(EC_ZEBRA_TM_DAEMON_MISMATCH,
"%s: Daemon mismatch!!", __func__);
continue;
}
break;
}
if (ret != 0)
- flog_err(ZEBRA_ERR_TM_UNRELEASED_CHUNK,
+ flog_err(EC_ZEBRA_TM_UNRELEASED_CHUNK,
"%s: Table chunk not released!!", __func__);
return ret;
l += IPV6_MAX_BYTELEN;
} else {
flog_err(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"rnh_register: Received unknown family type %d\n",
p.family);
return;
l += IPV6_MAX_BYTELEN;
} else {
flog_err(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"rnh_register: Received unknown family type %d\n",
p.family);
return;
*/
if (hdr->length < ZEBRA_MIN_FEC_LENGTH) {
flog_err(
- ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ EC_ZEBRA_IRDP_LEN_MISMATCH,
"fec_register: Received a fec register of hdr->length %d, it is of insufficient size to properly decode",
hdr->length);
return;
STREAM_GETW(s, p.family);
if (p.family != AF_INET && p.family != AF_INET6) {
flog_err(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"fec_register: Received unknown family type %d\n",
p.family);
return;
*/
if (hdr->length < ZEBRA_MIN_FEC_LENGTH) {
flog_err(
- ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ EC_ZEBRA_IRDP_LEN_MISMATCH,
"fec_unregister: Received a fec unregister of hdr->length %d, it is of insufficient size to properly decode",
hdr->length);
return;
STREAM_GETW(s, p.family);
if (p.family != AF_INET && p.family != AF_INET6) {
flog_err(
- ZEBRA_ERR_UNKNOWN_FAMILY,
+ EC_ZEBRA_UNKNOWN_FAMILY,
"fec_unregister: Received unknown family type %d\n",
p.family);
return;
prefix2str(p, buff, sizeof(buff));
flog_warn(
- ZEBRA_ERR_MORE_NH_THAN_MULTIPATH,
+ EC_ZEBRA_MORE_NH_THAN_MULTIPATH,
"%s: Prefix %s has %d nexthops, but we can only use the first %d",
caller, buff, nexthop_num, multipath_num);
}
if (!nexthop) {
flog_warn(
- ZEBRA_ERR_NEXTHOP_CREATION_FAILED,
+ EC_ZEBRA_NEXTHOP_CREATION_FAILED,
"%s: Nexthops Specified: %d but we failed to properly create one",
__PRETTY_FUNCTION__, api.nexthop_num);
nexthops_free(re->ng.nexthop);
afi = family2afi(api.prefix.family);
if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
- flog_warn(ZEBRA_ERR_RX_SRCDEST_WRONG_AFI,
+ flog_warn(EC_ZEBRA_RX_SRCDEST_WRONG_AFI,
"%s: Received SRC Prefix but afi is not v6",
__PRETTY_FUNCTION__);
nexthops_free(re->ng.nexthop);
afi = family2afi(api.prefix.family);
if (afi != AFI_IP6 && CHECK_FLAG(api.message, ZAPI_MESSAGE_SRCPFX)) {
- flog_warn(ZEBRA_ERR_RX_SRCDEST_WRONG_AFI,
+ flog_warn(EC_ZEBRA_RX_SRCDEST_WRONG_AFI,
"%s: Received a src prefix while afi is not v6",
__PRETTY_FUNCTION__);
return;
/* accept only dynamic routing protocols */
if ((proto >= ZEBRA_ROUTE_MAX) || (proto <= ZEBRA_ROUTE_STATIC)) {
- flog_err(ZEBRA_ERR_TM_WRONG_PROTO,
+ flog_err(EC_ZEBRA_TM_WRONG_PROTO,
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
zsend_table_manager_connect_response(client, vrf_id, 1);
/* accept only dynamic routing protocols */
if ((proto >= ZEBRA_ROUTE_MAX) || (proto <= ZEBRA_ROUTE_STATIC)) {
- flog_err(ZEBRA_ERR_TM_WRONG_PROTO,
+ flog_err(EC_ZEBRA_TM_WRONG_PROTO,
"client %d has wrong protocol %s", client->sock,
zebra_route_string(proto));
zsend_label_manager_connect_response(client, vrf_id, 1);
uint8_t proto, unsigned int instance)
{
if (proto != client->proto) {
- flog_err(ZEBRA_ERR_PROTO_OR_INSTANCE_MISMATCH,
+ flog_err(EC_ZEBRA_PROTO_OR_INSTANCE_MISMATCH,
"%s: msg vs client proto mismatch, client=%u msg=%u",
op, client->proto, proto);
/* TODO: fail when BGP sets proto and instance */
if (instance != client->instance) {
flog_err(
- ZEBRA_ERR_PROTO_OR_INSTANCE_MISMATCH,
+ EC_ZEBRA_PROTO_OR_INSTANCE_MISMATCH,
"%s: msg vs client instance mismatch, client=%u msg=%u",
op, client->instance, instance);
/* TODO: fail when BGP sets proto and instance */
lmc = assign_label_chunk(client->proto, client->instance, keep, size);
if (!lmc)
flog_err(
- ZEBRA_ERR_LM_CANNOT_ASSIGN_CHUNK,
+ EC_ZEBRA_LM_CANNOT_ASSIGN_CHUNK,
"Unable to assign Label Chunk of size %u to %s instance %u",
size, zebra_route_string(client->proto),
client->instance);
/* Sanity: don't allow 'unidentified' requests */
if (!client->proto) {
flog_err(
- ZEBRA_ERR_LM_ALIENS,
+ EC_ZEBRA_LM_ALIENS,
"Got label request from an unidentified client");
return;
}
tmc = assign_table_chunk(client->proto, client->instance, size);
if (!tmc)
- flog_err(ZEBRA_ERR_TM_CANNOT_ASSIGN_CHUNK,
+ flog_err(EC_ZEBRA_TM_CANNOT_ASSIGN_CHUNK,
"%s: Unable to assign Table Chunk of size %u",
__func__, size);
else
/* Sanity: don't allow 'unidentified' requests */
if (!client->proto) {
flog_err(
- ZEBRA_ERR_TM_ALIENS,
+ EC_ZEBRA_TM_ALIENS,
"Got table request from an unidentified client");
return;
}
switch (hdr->command) {
case ZEBRA_PW_ADD:
if (pw) {
- flog_warn(ZEBRA_ERR_PSEUDOWIRE_EXISTS,
+ flog_warn(EC_ZEBRA_PSEUDOWIRE_EXISTS,
"%s: pseudowire %s already exists [%s]",
__func__, ifname,
zserv_command_string(hdr->command));
break;
case ZEBRA_PW_DELETE:
if (!pw) {
- flog_warn(ZEBRA_ERR_PSEUDOWIRE_NONEXISTENT,
+ flog_warn(EC_ZEBRA_PSEUDOWIRE_NONEXISTENT,
"%s: pseudowire %s not found [%s]", __func__,
ifname, zserv_command_string(hdr->command));
return;
case ZEBRA_PW_SET:
case ZEBRA_PW_UNSET:
if (!pw) {
- flog_warn(ZEBRA_ERR_PSEUDOWIRE_NONEXISTENT,
+ flog_warn(EC_ZEBRA_PSEUDOWIRE_NONEXISTENT,
"%s: pseudowire %s not found [%s]", __func__,
ifname, zserv_command_string(hdr->command));
return;
/* clang-format off */
static struct log_ref ferr_zebra_err[] = {
{
- .code = ZEBRA_ERR_LM_RESPONSE,
+ .code = EC_ZEBRA_LM_RESPONSE,
.title = "Error reading response from label manager",
.description = "Zebra could not read the ZAPI header from the label manager",
.suggestion = "Wait for the error to resolve on its own. If it does not resolve, restart Zebra.",
},
{
- .code = ZEBRA_ERR_LM_NO_SUCH_CLIENT,
+ .code = EC_ZEBRA_LM_NO_SUCH_CLIENT,
.title = "Label manager could not find ZAPI client",
.description = "Zebra was unable to find a ZAPI client matching the given protocol and instance number.",
.suggestion = "Ensure clients which use the label manager are properly configured and running.",
},
{
- .code = ZEBRA_ERR_LM_RELAY_FAILED,
+ .code = EC_ZEBRA_LM_RELAY_FAILED,
.title = "Zebra could not relay label manager response",
.description = "Zebra found the client and instance to relay the label manager response or request to, but was not able to do so, possibly because the connection was closed.",
.suggestion = "Ensure clients which use the label manager are properly configured and running.",
},
{
- .code = ZEBRA_ERR_LM_BAD_INSTANCE,
+ .code = EC_ZEBRA_LM_BAD_INSTANCE,
.title = "Mismatch between ZAPI instance and encoded message instance",
.description = "While relaying a request to the external label manager, Zebra noticed that the instance number encoded in the message did not match the client instance number.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_LM_EXHAUSTED_LABELS,
+ .code = EC_ZEBRA_LM_EXHAUSTED_LABELS,
.title = "Zebra label manager used all available labels",
.description = "Zebra is unable to assign additional label chunks because it has exhausted its assigned label range.",
.suggestion = "Make the label range bigger and restart Zebra.",
},
{
- .code = ZEBRA_ERR_LM_DAEMON_MISMATCH,
+ .code = EC_ZEBRA_LM_DAEMON_MISMATCH,
.title = "Daemon mismatch when releasing label chunks",
.description = "Zebra noticed a mismatch between a label chunk and a protocol daemon number or instance when releasing unused label chunks.",
.suggestion = "Ignore this error.",
},
{
- .code = ZEBRA_ERR_LM_UNRELEASED_CHUNK,
+ .code = EC_ZEBRA_LM_UNRELEASED_CHUNK,
.title = "Zebra did not free any label chunks",
.description = "Zebra's chunk cleanup procedure ran, but no label chunks were released.",
.suggestion = "Ignore this error.",
},
{
- .code = ZEBRA_ERR_DP_INVALID_RC,
+ .code = EC_ZEBRA_DP_INVALID_RC,
.title = "Dataplane returned invalid status code",
.description = "The underlying dataplane responded to a Zebra message or other interaction with an unrecognized, unknown or invalid status code.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_WQ_NONEXISTENT,
+ .code = EC_ZEBRA_WQ_NONEXISTENT,
.title = "A necessary work queue does not exist.",
.description = "A necessary work queue does not exist.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_FEC_ADD_FAILED,
+ .code = EC_ZEBRA_FEC_ADD_FAILED,
.title = "Failed to add FEC for MPLS client",
.description = "A client requested a label binding for a new FEC, but Zebra was unable to add the FEC to its internal table.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_FEC_RM_FAILED,
+ .code = EC_ZEBRA_FEC_RM_FAILED,
.title = "Failed to remove FEC for MPLS client",
.description = "Zebra was unable to find and remove a FEC in its internal table.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_IRDP_LEN_MISMATCH,
+ .code = EC_ZEBRA_IRDP_LEN_MISMATCH,
.title = "IRDP message length mismatch",
.description = "The length encoded in the IP TLV does not match the length of the packet received.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_RNH_UNKNOWN_FAMILY,
+ .code = EC_ZEBRA_RNH_UNKNOWN_FAMILY,
.title = "Attempted to perform nexthop update for unknown address family",
.description = "Zebra attempted to perform a nexthop update for unknown address family",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_DP_INSTALL_FAIL,
+ .code = EC_ZEBRA_DP_INSTALL_FAIL,
.title = "Dataplane installation failure",
.description = "Installation of routes to underlying dataplane failed.",
.suggestion = "Check all configuration parameters for correctness.",
},
{
- .code = ZEBRA_ERR_DP_DELETE_FAIL,
+ .code = EC_ZEBRA_DP_DELETE_FAIL,
.title = "Dataplane deletion failure",
.description = "Deletion of routes from underlying dataplane failed.",
.suggestion = "Check all configuration parameters for correctness.",
},
{
- .code = ZEBRA_ERR_TABLE_LOOKUP_FAILED,
+ .code = EC_ZEBRA_TABLE_LOOKUP_FAILED,
.title = "Zebra table lookup failed",
.description = "Zebra attempted to look up a table for a particular address family and subsequent address family, but didn't find anything.",
.suggestion = "If you entered a command to trigger this error, make sure you entered the arguments correctly. Check your config file for any potential errors. If these look correct, seek help.",
},
{
- .code = ZEBRA_ERR_NETLINK_NOT_AVAILABLE,
+ .code = EC_ZEBRA_NETLINK_NOT_AVAILABLE,
.title = "Netlink backend not available",
.description = "FRR was not compiled with support for Netlink. Any operations that require Netlink will fail.",
.suggestion = "Recompile FRR with Netlink, or install a package that supports this feature.",
},
{
- .code = ZEBRA_ERR_PROTOBUF_NOT_AVAILABLE,
+ .code = EC_ZEBRA_PROTOBUF_NOT_AVAILABLE,
.title = "Protocol Buffers backend not available",
.description = "FRR was not compiled with support for Protocol Buffers. Any operations that require Protobuf will fail.",
.suggestion = "Recompile FRR with Protobuf support, or install a package that supports this feature.",
},
{
- .code = ZEBRA_ERR_TM_EXHAUSTED_IDS,
+ .code = EC_ZEBRA_TM_EXHAUSTED_IDS,
.title = "Table manager used all available IDs",
.description = "Zebra's table manager used up all IDs available to it and can't assign any more.",
.suggestion = "Reconfigure Zebra with a larger range of table IDs.",
},
{
- .code = ZEBRA_ERR_TM_DAEMON_MISMATCH,
+ .code = EC_ZEBRA_TM_DAEMON_MISMATCH,
.title = "Daemon mismatch when releasing table chunks",
.description = "Zebra noticed a mismatch between a table ID chunk and a protocol daemon number instance when releasing unused table chunks.",
.suggestion = "Ignore this error.",
},
{
- .code = ZEBRA_ERR_TM_UNRELEASED_CHUNK,
+ .code = EC_ZEBRA_TM_UNRELEASED_CHUNK,
.title = "Zebra did not free any table chunks",
.description = "Zebra's table chunk cleanup procedure ran, but no table chunks were released.",
.suggestion = "Ignore this error.",
},
{
- .code = ZEBRA_ERR_UNKNOWN_FAMILY,
+ .code = EC_ZEBRA_UNKNOWN_FAMILY,
.title = "Address family specifier unrecognized",
.description = "Zebra attempted to process information from somewhere that included an address family specifier, but did not recognize the provided specifier.",
.suggestion = "Ensure that your configuration is correct. If it is, notify a developer.",
},
{
- .code = ZEBRA_ERR_TM_WRONG_PROTO,
+ .code = EC_ZEBRA_TM_WRONG_PROTO,
.title = "Incorrect protocol for table manager client",
.description = "Zebra's table manager only accepts connections from daemons managing dynamic routing protocols, but received a connection attempt from a daemon that does not meet this criterion.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_PROTO_OR_INSTANCE_MISMATCH,
+ .code = EC_ZEBRA_PROTO_OR_INSTANCE_MISMATCH,
.title = "Mismatch between message and client protocol and/or instance",
.description = "Zebra detected a mismatch between a client's protocol and/or instance numbers versus those stored in a message transiting its socket.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_LM_CANNOT_ASSIGN_CHUNK,
+ .code = EC_ZEBRA_LM_CANNOT_ASSIGN_CHUNK,
.title = "Label manager unable to assign label chunk",
.description = "Zebra's label manager was unable to assign a label chunk to client.",
.suggestion = "Ensure that Zebra has a sufficient label range available and that there is not a range collision.",
},
{
- .code = ZEBRA_ERR_LM_ALIENS,
+ .code = EC_ZEBRA_LM_ALIENS,
.title = "Label request from unidentified client",
.description = "Zebra's label manager received a label request from an unidentified client.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_TM_CANNOT_ASSIGN_CHUNK,
+ .code = EC_ZEBRA_TM_CANNOT_ASSIGN_CHUNK,
.title = "Table manager unable to assign table chunk",
.description = "Zebra's table manager was unable to assign a table chunk to a client.",
.suggestion = "Ensure that Zebra has sufficient table ID range available and that there is not a range collision.",
},
{
- .code = ZEBRA_ERR_TM_ALIENS,
+ .code = EC_ZEBRA_TM_ALIENS,
.title = "Table request from unidentified client",
.description = "Zebra's table manager received a table request from an unidentified client.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_RECVBUF,
+ .code = EC_ZEBRA_RECVBUF,
.title = "Cannot set receive buffer size",
.description = "Socket receive buffer size could not be set in the kernel",
.suggestion = "Ignore this error.",
},
{
- .code = ZEBRA_ERR_UNKNOWN_NLMSG,
+ .code = EC_ZEBRA_UNKNOWN_NLMSG,
.title = "Unknown Netlink message type",
.description = "Zebra received a Netlink message with an unrecognized type field.",
.suggestion = "Verify that you are running the latest version of FRR to ensure kernel compatibility. If the problem persists, notify a developer.",
},
{
- .code = ZEBRA_ERR_RECVMSG_OVERRUN,
+ .code = EC_ZEBRA_RECVMSG_OVERRUN,
.title = "Receive buffer overrun",
.description = "The kernel's buffer for a socket has been overrun, rendering the socket invalid.",
.suggestion = "Zebra will restart itself. Notify a developer if this issue shows up frequently.",
},
{
- .code = ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ .code = EC_ZEBRA_NETLINK_LENGTH_ERROR,
.title = "Netlink message length mismatch",
.description = "Zebra received a Netlink message with incorrect length fields.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ .code = EC_ZEBRA_NETLINK_LENGTH_ERROR,
.title = "Netlink message length mismatch",
.description = "Zebra received a Netlink message with incorrect length fields.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_UNEXPECTED_MESSAGE,
+ .code = EC_ZEBRA_UNEXPECTED_MESSAGE,
.title = "Received unexpected response from kernel",
.description = "Received unexpected response from the kernel via Netlink.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_NETLINK_BAD_SEQUENCE,
+ .code = EC_ZEBRA_NETLINK_BAD_SEQUENCE,
.title = "Bad sequence number in Netlink message",
.description = "Zebra received a Netlink message with a bad sequence number.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_BAD_MULTIPATH_NUM,
+ .code = EC_ZEBRA_BAD_MULTIPATH_NUM,
.title = "Multipath number was out of valid range",
.description = "Multipath number specified to Zebra must be in the appropriate range",
.suggestion = "Provide a multipath number that is within its accepted range",
},
{
- .code = ZEBRA_ERR_PREFIX_PARSE_ERROR,
+ .code = EC_ZEBRA_PREFIX_PARSE_ERROR,
.title = "String could not be parsed as IP prefix",
.description = "There was an attempt to parse a string as an IPv4 or IPv6 prefix, but the string could not be parsed and this operation failed.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_MAC_ADD_FAILED,
+ .code = EC_ZEBRA_MAC_ADD_FAILED,
.title = "Failed to add MAC address to interface",
.description = "Zebra attempted to assign a MAC address to a vxlan interface but failed",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_VNI_DEL_FAILED,
+ .code = EC_ZEBRA_VNI_DEL_FAILED,
.title = "Failed to delete VNI",
.description = "Zebra attempted to delete a VNI entry and failed",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_VTEP_ADD_FAILED,
+ .code = EC_ZEBRA_VTEP_ADD_FAILED,
.title = "Adding remote VTEP failed",
.description = "Zebra attempted to add a remote VTEP and failed.",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_VNI_ADD_FAILED,
+ .code = EC_ZEBRA_VNI_ADD_FAILED,
.title = "Adding VNI failed",
.description = "Zebra attempted to add a VNI hash to an interface and failed",
.suggestion = "Notify a developer.",
},
{
- .code = ZEBRA_ERR_NS_NOTIFY_READ,
+ .code = EC_ZEBRA_NS_NOTIFY_READ,
.title = "Zebra failed to read namespace inotify information",
.description = "Zebra received an event from inotify, but failed to read what it was.",
.suggestion = "Notify a developer.",
},
/* Warnings */
{
- .code = ZEBRA_WARNING_LM_PROTO_MISMATCH,
+ .code = EC_ZEBRAING_LM_PROTO_MISMATCH,
.title =
"Zebra label manager received malformed label request",
.description =
"This is a bug. Please report it.",
},
{
- .code = ZEBRA_ERR_LSP_INSTALL_FAILURE,
+ .code = EC_ZEBRA_LSP_INSTALL_FAILURE,
.title =
"Zebra failed to install LSP into the kernel",
.description =
"Wait for Zebra to reattempt installation.",
},
{
- .code = ZEBRA_ERR_LSP_DELETE_FAILURE,
+ .code = EC_ZEBRA_LSP_DELETE_FAILURE,
.title =
"Zebra failed to remove LSP from the kernel",
.description =
"Wait for Zebra to reattempt deletion.",
},
{
- .code = ZEBRA_ERR_MPLS_SUPPORT_DISABLED,
+ .code = EC_ZEBRA_MPLS_SUPPORT_DISABLED,
.title =
"Zebra will not run with MPLS support",
.description =
"If you want MPLS support, upgrade the kernel to a version that provides MPLS support.",
},
{
- .code = ZEBRA_ERR_SYSCTL_FAILED,
+ .code = EC_ZEBRA_SYSCTL_FAILED,
.title = "A call to sysctl() failed",
.description =
"sysctl() returned a nonzero exit code, indicating an error.",
"The log message should contain further details on the specific error that occurred; investigate the reported error.",
},
{
- .code = ZEBRA_ERR_NS_VRF_CREATION_FAILED,
+ .code = EC_ZEBRA_NS_VRF_CREATION_FAILED,
.title =
"Zebra failed to create namespace VRF",
.description =
.suggestion = "",
},
{
- .code = ZEBRA_ERR_NS_DELETION_FAILED_NO_VRF,
+ .code = EC_ZEBRA_NS_DELETION_FAILED_NO_VRF,
.title =
"Zebra attempted to delete nonexistent namespace",
.description =
.suggestion = "Please report this bug.",
},
{
- .code = ZEBRA_ERR_IFLIST_FAILED,
+ .code = EC_ZEBRA_IFLIST_FAILED,
.title =
"Zebra interface listing failed",
.description =
"Check that Zebra is running with the appropriate permissions. If it is, please report this as a bug.",
},
{
- .code = ZEBRA_ERR_IRDP_BAD_CHECKSUM,
+ .code = EC_ZEBRA_IRDP_BAD_CHECKSUM,
.title =
"Zebra received ICMP packet with invalid checksum",
.description =
"If the problem continues to occur, investigate the source of the bad ICMP packets.",
},
{
- .code = ZEBRA_ERR_IRDP_BAD_TYPE_CODE,
+ .code = EC_ZEBRA_IRDP_BAD_TYPE_CODE,
.title =
"Zebra received ICMP packet with bad type code",
.description =
"If the problem continues to occur, investigate the source of the bad ICMP packets.",
},
{
- .code = ZEBRA_ERR_IRDP_BAD_RX_FLAGS,
+ .code = EC_ZEBRA_IRDP_BAD_RX_FLAGS,
.title =
"Zebra received IRDP packet while operating in wrong mode",
.description =
"If you wish to receive the messages, change your IRDP settings accordingly.",
},
{
- .code = ZEBRA_ERR_IRDP_BAD_TYPE,
+ .code = EC_ZEBRA_IRDP_BAD_TYPE,
.title =
"Zebra received IRDP packet with bad type",
.description =
.suggestion = "asdf",
},
{
- .code = ZEBRA_ERR_RNH_NO_TABLE,
+ .code = EC_ZEBRA_RNH_NO_TABLE,
.title =
"Zebra could not find table for next hop",
.description =
.suggestion = "Please report this bug.",
},
{
- .code = ZEBRA_ERR_FPM_FORMAT_UNKNOWN,
+ .code = EC_ZEBRA_FPM_FORMAT_UNKNOWN,
.title =
"Unknown message format for Zebra's FPM module",
.description =
"Provide or correct the module argument to provide a valid format. See documentation for further information.",
},
{
- .code = ZEBRA_ERR_CLIENT_IO_ERROR,
+ .code = EC_ZEBRA_CLIENT_IO_ERROR,
.title =
"Zebra client connection failed",
.description =
"Ignore this warning, it is mostly informational.",
},
{
- .code = ZEBRA_ERR_CLIENT_WRITE_FAILED,
+ .code = EC_ZEBRA_CLIENT_WRITE_FAILED,
.title =
"Zebra failed to send message to client",
.description =
"Ignore this warning, it is mostly informational.",
},
{
- .code = ZEBRA_ERR_NETLINK_INVALID_AF,
+ .code = EC_ZEBRA_NETLINK_INVALID_AF,
.title =
"Zebra received Netlink message with invalid family",
.description =
"Inspect the logged address family and submit it with a bug report.",
},
{
- .code = ZEBRA_ERR_REMOVE_ADDR_UNKNOWN_SUBNET,
+ .code = EC_ZEBRA_REMOVE_ADDR_UNKNOWN_SUBNET,
.title =
"Zebra tried to remove address from unknown subnet",
.description =
"This is a bug, please report it.",
},
{
- .code = ZEBRA_ERR_REMOVE_UNREGISTERED_ADDR,
+ .code = EC_ZEBRA_REMOVE_UNREGISTERED_ADDR,
.title =
"Zebra tried to remove unregistered address",
.description =
"This is a bug, please report it.",
},
{
- .code = ZEBRA_ERR_PTM_NOT_READY,
+ .code = EC_ZEBRA_PTM_NOT_READY,
.title =
"Interface is up but PTM check has not completed",
.description =
"If the problem persists, ensure that the interface is actually up and that PTM is functioning properly.",
},
{
- .code = ZEBRA_ERR_UNSUPPORTED_V4_SRCDEST,
+ .code = EC_ZEBRA_UNSUPPORTED_V4_SRCDEST,
.title =
"Kernel rejected sourcedest route",
.description =
"Check configuration values for correctness",
},
{
- .code = ZEBRA_ERR_UNKNOWN_INTERFACE,
+ .code = EC_ZEBRA_UNKNOWN_INTERFACE,
.title =
"Zebra encountered an unknown interface specifier",
.description =
"Check configuration values for correctness.",
},
{
- .code = ZEBRA_ERR_VRF_NOT_FOUND,
+ .code = EC_ZEBRA_VRF_NOT_FOUND,
.title =
"Zebra could not find the specified VRF",
.description =
"Check configuration values for correctness. If values are correct, please file a bug report.",
},
{
- .code = ZEBRA_ERR_MORE_NH_THAN_MULTIPATH,
+ .code = EC_ZEBRA_MORE_NH_THAN_MULTIPATH,
.title =
"More nexthops were provided than the configured multipath limit",
.description =
"Reduce the number of nexthops, or increase the multipath limit.",
},
{
- .code = ZEBRA_ERR_NEXTHOP_CREATION_FAILED,
+ .code = EC_ZEBRA_NEXTHOP_CREATION_FAILED,
.title =
"Zebra failed to create one or more nexthops",
.description =
"Check configuration values for correctness. If they are correct, report this as a bug.",
},
{
- .code = ZEBRA_ERR_RX_SRCDEST_WRONG_AFI,
+ .code = EC_ZEBRA_RX_SRCDEST_WRONG_AFI,
.title =
"Zebra received sourcedest route install without IPv6 address family",
.description =
"This is a bug; please report it.",
},
{
- .code = ZEBRA_ERR_PSEUDOWIRE_EXISTS,
+ .code = EC_ZEBRA_PSEUDOWIRE_EXISTS,
.title =
"Zebra received an installation / creation request for a pseudowire that already exists",
.description =
"This message is informational.",
},
{
- .code = ZEBRA_ERR_PSEUDOWIRE_NONEXISTENT,
+ .code = EC_ZEBRA_PSEUDOWIRE_NONEXISTENT,
.title =
"Zebra received an uninstallation / deletion request for a pseudowire that already exists",
.description =
"This message is informational.",
},
{
- .code = ZEBRA_ERR_PSEUDOWIRE_UNINSTALL_NOT_FOUND,
+ .code = EC_ZEBRA_PSEUDOWIRE_UNINSTALL_NOT_FOUND,
.title =
"Zebra received uninstall request for a pseudowire that doesn't exist",
.description =
"This message is informational.",
},
{
- .code = ZEBRA_ERR_NO_IFACE_ADDR,
+ .code = EC_ZEBRA_NO_IFACE_ADDR,
.title = "No address on interface",
.description =
"Zebra attempted to retrieve a connected address for an interface, but the interface had no connected addresses.",
"This warning is situational; it is usually informative but can indicate a misconfiguration.",
},
{
- .code = ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
+ .code = EC_ZEBRA_IFACE_ADDR_ADD_FAILED,
.title =
"Zebra failed to add address to interface",
.description =
"Check configuration values for correctness.",
},
{
- .code = ZEBRA_ERR_IRDP_CANNOT_ACTIVATE_IFACE,
+ .code = EC_ZEBRA_IRDP_CANNOT_ACTIVATE_IFACE,
.title =
"Zebra could not enable IRDP on interface",
.description =
"Verify that Zebra has the appropriate privileges and that the system has sufficient socket resources.",
},
{
- .code = ZEBRA_ERR_IRDP_IFACE_DOWN,
+ .code = EC_ZEBRA_IRDP_IFACE_DOWN,
.title =
"Zebra attempted to enable IRDP on an interface, but the interface was down",
.description = "Zebra attempted to enable IRDP on an interface, but the interface was down.",
"Bring up the interface that IRDP is desired on.",
},
{
- .code = ZEBRA_ERR_IRDP_IFACE_MCAST_DISABLED,
+ .code = EC_ZEBRA_IRDP_IFACE_MCAST_DISABLED,
.title =
"Zebra cannot enable IRDP on interface because multicast is disabled",
.description =
"Enable multicast on the interface.",
},
{
- .code = ZEBRA_ERR_NETLINK_EXTENDED_WARNING,
+ .code = EC_ZEBRA_NETLINK_EXTENDED_WARNING,
.title =
"Zebra received warning message from Netlink",
.description =
"This message is informational. See the Netlink error message for details.",
},
{
- .code = ZEBRA_ERR_NAMESPACE_DIR_INACCESSIBLE,
+ .code = EC_ZEBRA_NAMESPACE_DIR_INACCESSIBLE,
.title =
"Zebra could not access /var/run/netns",
.description =
"Ensure that Zebra has the proper privileges to access this directory.",
},
{
- .code = ZEBRA_ERR_CONNECTED_AFI_UNKNOWN,
+ .code = EC_ZEBRA_CONNECTED_AFI_UNKNOWN,
.title =
"Zebra received unknown address family on interface",
.description =
"This message is informational.",
},
{
- .code = ZEBRA_ERR_IFACE_SAME_LOCAL_AS_PEER,
+ .code = EC_ZEBRA_IFACE_SAME_LOCAL_AS_PEER,
.title =
"Zebra route has same destination address as local interface",
.description =
"Investigate the source of the route to determine why the destination and interface addresses are the same.",
},
{
- .code = ZEBRA_ERR_BCAST_ADDR_MISMATCH,
+ .code = EC_ZEBRA_BCAST_ADDR_MISMATCH,
.title =
"Zebra broadcast address sanity check failed",
.description =
"Investigate the source of the broadcast address to determine why it does not match the computed address.",
},
{
- .code = ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
+ .code = EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
.title =
"Zebra encountered unknown address family during redistribution",
.description =
"This warning can be ignored; the redistribution operation will skip the unknown address family.",
},
{
- .code = ZEBRA_ERR_ADVERTISING_UNUSABLE_ADDR,
+ .code = EC_ZEBRA_ADVERTISING_UNUSABLE_ADDR,
.title =
"Zebra advertising unusable interface address",
.description =
"This message is informational. The address should show up on the interface shortly after advertisement.",
},
{
- .code = ZEBRA_ERR_RA_PARAM_MISMATCH,
+ .code = EC_ZEBRA_RA_PARAM_MISMATCH,
.title =
"Zebra received route advertisement with parameter mismatch",
.description =
"This message is informational; the route advertisement will be processed as normal. If issues arise due to the parameter mismatch, check Zebra's router advertisement configuration.",
},
{
- .code = ZEBRA_ERR_RTM_VERSION_MISMATCH,
+ .code = EC_ZEBRA_RTM_VERSION_MISMATCH,
.title =
"Zebra received kernel message with uknown version",
.description =
"If issues arise, check if there is a version of FRR available for your kernel version.",
},
{
- .code = ZEBRA_ERR_RTM_NO_GATEWAY,
+ .code = EC_ZEBRA_RTM_NO_GATEWAY,
.title =
"Zebra could not determine proper gateway for kernel route",
.description =
"Check configuration values for correctness.",
},
{
- .code = ZEBRA_ERR_MAX_LABELS_PUSH,
+ .code = EC_ZEBRA_MAX_LABELS_PUSH,
.title =
"Zebra exceeded maximum LSP labels for a single rtmsg",
.description =
"This message is informational.",
},
{
- .code = ZEBRA_ERR_STICKY_MAC_ALREADY_LEARNT,
+ .code = EC_ZEBRA_STICKY_MAC_ALREADY_LEARNT,
.title =
"EVPN MAC already learnt as remote sticky MAC",
.description =
"Check configuration values for correctness.",
},
{
- .code = ZEBRA_ERR_UNSUPPORTED_V6_SRCDEST,
+ .code = EC_ZEBRA_UNSUPPORTED_V6_SRCDEST,
.title =
"Kernel does not support IPv6 sourcedest routes",
.description =
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef __ZEBRA_ERRORS_H__
-#define __ZEBRA_ERRORS_H__
+#ifndef __EC_ZEBRAORS_H__
+#define __EC_ZEBRAORS_H__
#include "lib/ferr.h"
enum zebra_log_refs {
- ZEBRA_ERR_LM_RESPONSE = ZEBRA_FERR_START,
- ZEBRA_ERR_LM_NO_SUCH_CLIENT,
- ZEBRA_ERR_LM_RELAY_FAILED,
- ZEBRA_ERR_LM_NO_SOCKET,
- ZEBRA_ERR_LM_BAD_INSTANCE,
- ZEBRA_ERR_LM_RELAY_REQUEST_FAILED,
- ZEBRA_ERR_LM_CLIENT_CONNECTION_FAILED,
- ZEBRA_ERR_LM_EXHAUSTED_LABELS,
- ZEBRA_ERR_LM_DAEMON_MISMATCH,
- ZEBRA_ERR_LM_UNRELEASED_CHUNK,
- ZEBRA_ERR_DP_INVALID_RC,
- ZEBRA_ERR_WQ_NONEXISTENT,
- ZEBRA_ERR_FEC_ADD_FAILED,
- ZEBRA_ERR_FEC_RM_FAILED,
- ZEBRA_ERR_IRDP_LEN_MISMATCH,
- ZEBRA_ERR_RNH_UNKNOWN_FAMILY,
- ZEBRA_ERR_DP_INSTALL_FAIL,
- ZEBRA_ERR_DP_DELETE_FAIL,
- ZEBRA_ERR_TABLE_LOOKUP_FAILED,
- ZEBRA_ERR_NETLINK_NOT_AVAILABLE,
- ZEBRA_ERR_PROTOBUF_NOT_AVAILABLE,
- ZEBRA_ERR_TM_EXHAUSTED_IDS,
- ZEBRA_ERR_TM_DAEMON_MISM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_AFI,
+ EC_ZEBRA_PSEUDOWIRE_EXISTS,
+ EC_ZEBRA_PSEUDOWIRE_UNINSTALL_NOT_FOUND,
+ EC_ZEBRA_PSEUDOWIRE_NONEXISTENT,
+ EC_ZEBRA_NO_IFACE_ADDR,
+ EC_ZEBRA_IFACE_ADDR_ADD_FAILED,
+ EC_ZEBRA_IRDP_CANNOT_ACTIVATE_IFACE,
+ EC_ZEBRA_IRDP_IFACE_DOWN,
+ EC_ZEBRA_IRDP_IFACE_MCAST_DISABLED,
+ EC_ZEBRA_NETLINK_EXTENDED_WARNING,
+ EC_ZEBRA_NAMESPACE_DIR_INACCESSIBLE,
+ EC_ZEBRA_CONNECTED_AFI_UNKNOWN,
+ EC_ZEBRA_IFACE_SAME_LOCAL_AS_PEER,
+ EC_ZEBRA_BCAST_ADDR_MISMATCH,
+ EC_ZEBRA_REDISTRIBUTE_UNKNOWN_AF,
+ EC_ZEBRA_ADVERTISING_UNUSABLE_ADDR,
+ EC_ZEBRA_RA_PARAM_MISMATCH,
+ EC_ZEBRA_RTM_VERSION_MISMATCH,
+ EC_ZEBRA_RTM_NO_GATEWAY,
+ EC_ZEBRA_MAX_LABELS_PUSH,
+ EC_ZEBRA_STICKY_MAC_ALREADY_LEARNT,
+ EC_ZEBRA_UNSUPPORTED_V6_SRCDEST,
};
void zebra_error_init(void);
-#endif /* __ZEBRA_ERRORS_H__ */
+#endif /* __EC_ZEBRAORS_H__ */
if (!strcmp("netlink", format)) {
if (!have_netlink) {
flog_err(
- ZEBRA_ERR_NETLINK_NOT_AVAILABLE,
+ EC_ZEBRA_NETLINK_NOT_AVAILABLE,
"FPM netlink message format is not available");
return;
}
if (!strcmp("protobuf", format)) {
if (!have_protobuf) {
flog_err(
- ZEBRA_ERR_PROTOBUF_NOT_AVAILABLE,
+ EC_ZEBRA_PROTOBUF_NOT_AVAILABLE,
"FPM protobuf message format is not available");
return;
}
return;
}
- flog_warn(ZEBRA_ERR_FPM_FORMAT_UNKNOWN, "Unknown fpm format '%s'",
+ flog_warn(EC_ZEBRA_FPM_FORMAT_UNKNOWN, "Unknown fpm format '%s'",
format);
}
switch (kernel_add_lsp(lsp)) {
case DP_REQUEST_QUEUED:
flog_err(
- ZEBRA_ERR_DP_INVALID_RC,
+ EC_ZEBRA_DP_INVALID_RC,
"No current DataPlane interfaces can return this, please fix");
break;
case DP_REQUEST_FAILURE:
switch (kernel_del_lsp(lsp)) {
case DP_REQUEST_QUEUED:
flog_err(
- ZEBRA_ERR_DP_INVALID_RC,
+ EC_ZEBRA_DP_INVALID_RC,
"No current DataPlane interfaces can return this, please fix");
break;
case DP_REQUEST_FAILURE:
switch (kernel_upd_lsp(lsp)) {
case DP_REQUEST_QUEUED:
flog_err(
- ZEBRA_ERR_DP_INVALID_RC,
+ EC_ZEBRA_DP_INVALID_RC,
"No current DataPlane interfaces can return this, please fix");
break;
case DP_REQUEST_FAILURE:
return 0;
if (zebrad.lsp_process_q == NULL) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: work_queue does not exist!", __func__);
return -1;
}
{
zebra->lsp_process_q = work_queue_new(zebra->master, "LSP processing");
if (!zebra->lsp_process_q) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise work queue!", __func__);
return -1;
}
case DP_INSTALL_FAILURE:
UNSET_FLAG(lsp->flags, LSP_FLAG_INSTALLED);
clear_nhlfe_installed(lsp);
- flog_warn(ZEBRA_ERR_LSP_INSTALL_FAILURE,
+ flog_warn(EC_ZEBRA_LSP_INSTALL_FAILURE,
"LSP Install Failure: %u", lsp->ile.in_label);
break;
case DP_INSTALL_SUCCESS:
clear_nhlfe_installed(lsp);
break;
case DP_DELETE_FAILURE:
- flog_warn(ZEBRA_ERR_LSP_DELETE_FAILURE,
+ flog_warn(EC_ZEBRA_LSP_DELETE_FAILURE,
"LSP Deletion Failure: %u", lsp->ile.in_label);
break;
}
if (!fec) {
prefix2str(p, buf, BUFSIZ);
flog_err(
- ZEBRA_ERR_FEC_ADD_FAILED,
+ EC_ZEBRA_FEC_ADD_FAILED,
"Failed to add FEC %s upon register, client %s",
buf, zebra_route_string(client->proto));
return -1;
fec = fec_find(table, p);
if (!fec) {
prefix2str(p, buf, BUFSIZ);
- flog_err(ZEBRA_ERR_FEC_RM_FAILED,
+ flog_err(EC_ZEBRA_FEC_RM_FAILED,
"Failed to find FEC %s upon unregister, client %s",
buf, zebra_route_string(client->proto));
return -1;
MPLS_INVALID_LABEL_INDEX);
if (!fec) {
prefix2str(p, buf, BUFSIZ);
- flog_err(ZEBRA_ERR_FEC_ADD_FAILED,
+ flog_err(EC_ZEBRA_FEC_ADD_FAILED,
"Failed to add FEC %s upon config", buf);
return -1;
}
fec = fec_find(table, p);
if (!fec) {
prefix2str(p, buf, BUFSIZ);
- flog_err(ZEBRA_ERR_FEC_RM_FAILED,
+ flog_err(EC_ZEBRA_FEC_RM_FAILED,
"Failed to find FEC %s upon delete", buf);
return -1;
}
mpls_enabled = 0;
if (mpls_kernel_init() < 0) {
- flog_warn(ZEBRA_ERR_MPLS_SUPPORT_DISABLED,
+ flog_warn(EC_ZEBRA_MPLS_SUPPORT_DISABLED,
"Disabling MPLS support (no kernel support)");
return;
}
&& (CHECK_FLAG(nhlfe->flags, NHLFE_FLAG_INSTALLED)
&& CHECK_FLAG(nexthop->flags, NEXTHOP_FLAG_FIB)))) {
if (nhlfe->nexthop->nh_label->num_labels > 1) {
- flog_warn(ZEBRA_ERR_MAX_LABELS_PUSH,
+ flog_warn(EC_ZEBRA_MAX_LABELS_PUSH,
"%s: can't push %u labels at once "
"(maximum is 1)",
__func__,
return -1;
}
if (msg.msg_flags & MSG_TRUNC) {
- flog_err(ZEBRA_ERR_NETLINK_LENGTH_ERROR,
+ flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR,
"netlink recvmsg : error message truncated");
return -1;
}
/* nlh already points to buf */
if (nlh->nlmsg_seq != seq) {
flog_err(
- ZEBRA_ERR_NETLINK_BAD_SEQUENCE,
+ EC_ZEBRA_NETLINK_BAD_SEQUENCE,
"netlink recvmsg: bad sequence number %x (expected %x)",
seq, nlh->nlmsg_seq);
return -1;
/* S_IRWXU|S_IRGRP|S_IXGRP|S_IROTH|S_IXOTH */
if (mkdir(NS_RUN_DIR, 0755)) {
if (errno != EEXIST) {
- flog_warn(ZEBRA_ERR_NAMESPACE_DIR_INACCESSIBLE,
+ flog_warn(EC_ZEBRA_NAMESPACE_DIR_INACCESSIBLE,
"NS check: failed to access %s", NS_RUN_DIR);
return;
}
return;
}
if (vrf_handler_create(NULL, name, &vrf) != CMD_SUCCESS) {
- flog_warn(ZEBRA_ERR_NS_VRF_CREATION_FAILED,
+ flog_warn(EC_ZEBRA_NS_VRF_CREATION_FAILED,
"NS notify : failed to create VRF %s", name);
ns_map_nsid_with_external(ns_id, false);
return;
ns_id_external, ns_id);
}
if (ret != CMD_SUCCESS) {
- flog_warn(ZEBRA_ERR_NS_VRF_CREATION_FAILED,
+ flog_warn(EC_ZEBRA_NS_VRF_CREATION_FAILED,
"NS notify : failed to create NS %s", netnspath);
ns_map_nsid_with_external(ns_id, false);
vrf_delete(vrf);
struct ns *ns;
if (!vrf) {
- flog_warn(ZEBRA_ERR_NS_DELETION_FAILED_NO_VRF,
+ flog_warn(EC_ZEBRA_NS_DELETION_FAILED_NO_VRF,
"NS notify : no VRF found using NS %s", name);
return 0;
}
zebrad.master, zebra_ns_notify_read, NULL, fd_monitor, NULL);
len = read(fd_monitor, buf, sizeof(buf));
if (len < 0) {
- flog_err_sys(ZEBRA_ERR_NS_NOTIFY_READ,
+ flog_err_sys(EC_ZEBRA_NS_NOTIFY_READ,
"NS notify read: failed to read (%s)",
safe_strerror(errno));
return 0;
if (offsetof(struct inotify_event, name) + event->len
>= sizeof(buf)) {
- flog_err(ZEBRA_ERR_NS_NOTIFY_READ,
+ flog_err(EC_ZEBRA_NS_NOTIFY_READ,
"NS notify read: buffer underflow");
break;
}
if (strnlen(event->name, event->len) == event->len) {
- flog_err(ZEBRA_ERR_NS_NOTIFY_READ,
+ flog_err(EC_ZEBRA_NS_NOTIFY_READ,
"NS notify error: bad event name");
break;
}
dest_str, src_str);
if (str2prefix(dest_str, &dest_prefix) == 0) {
- flog_err(ZEBRA_ERR_PREFIX_PARSE_ERROR,
+ flog_err(EC_ZEBRA_PREFIX_PARSE_ERROR,
"%s: Peer addr %s not found", __func__, dest_str);
return -1;
}
memset(&src_prefix, 0, sizeof(struct prefix));
if (strcmp(ZEBRA_PTM_INVALID_SRC_IP, src_str)) {
if (str2prefix(src_str, &src_prefix) == 0) {
- flog_err(ZEBRA_ERR_PREFIX_PARSE_ERROR,
+ flog_err(EC_ZEBRA_PREFIX_PARSE_ERROR,
"%s: Local addr %s not found", __func__,
src_str);
return -1;
ifp = if_lookup_by_name_all_vrf(port_str);
if (!ifp) {
- flog_warn(ZEBRA_ERR_UNKNOWN_INTERFACE,
+ flog_warn(EC_ZEBRA_UNKNOWN_INTERFACE,
"%s: %s not found in interface list",
__func__, port_str);
return -1;
dest->selected_fib = re;
zsend_route_notify_owner(re, p, ZAPI_ROUTE_FAIL_INSTALL);
- flog_err(ZEBRA_ERR_DP_INSTALL_FAIL,
+ flog_err(EC_ZEBRA_DP_INSTALL_FAIL,
"%u:%s: Route install failed", re->vrf_id,
prefix2str(p, buf, sizeof(buf)));
break;
* delete fails?
*/
dest->selected_fib = NULL;
- flog_err(ZEBRA_ERR_DP_DELETE_FAIL,
+ flog_err(EC_ZEBRA_DP_DELETE_FAIL,
"%u:%s: Route Deletion failure", re->vrf_id,
prefix2str(p, buf, sizeof(buf)));
switch (kernel_route_rib(rn, p, src_p, old, re)) {
case DP_REQUEST_QUEUED:
flog_err(
- ZEBRA_ERR_DP_INVALID_RC,
+ EC_ZEBRA_DP_INVALID_RC,
"No current known DataPlane interfaces can return this, please fix");
break;
case DP_REQUEST_FAILURE:
flog_err(
- ZEBRA_ERR_DP_INSTALL_FAIL,
+ EC_ZEBRA_DP_INSTALL_FAIL,
"No current known Rib Install Failure cases, please fix");
break;
case DP_REQUEST_SUCCESS:
switch (kernel_route_rib(rn, p, src_p, re, NULL)) {
case DP_REQUEST_QUEUED:
flog_err(
- ZEBRA_ERR_DP_INVALID_RC,
+ EC_ZEBRA_DP_INVALID_RC,
"No current known DataPlane interfaces can return this, please fix");
break;
case DP_REQUEST_FAILURE:
flog_err(
- ZEBRA_ERR_DP_INSTALL_FAIL,
+ EC_ZEBRA_DP_INSTALL_FAIL,
"No current known RIB Install Failure cases, please fix");
break;
case DP_REQUEST_SUCCESS:
}
if (zebrad.ribq == NULL) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: work_queue does not exist!", __func__);
return;
}
if (!(zebra->ribq =
work_queue_new(zebra->master, "route_node processing"))) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise work queue!", __func__);
return;
}
zebra->ribq->spec.hold = ZEBRA_RIB_PROCESS_HOLD_TIME;
if (!(zebra->mq = meta_queue_new())) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise meta queue!", __func__);
return;
}
/* Lookup table. */
table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id);
if (!table) {
- flog_err(ZEBRA_ERR_TABLE_LOOKUP_FAILED,
+ flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
return;
rib_dest_t *dest;
if (NULL == (table = zebra_vrf_table(AFI_IP, SAFI_UNICAST, vrf_id))) {
- flog_err(ZEBRA_ERR_TABLE_LOOKUP_FAILED,
+ flog_err(EC_ZEBRA_TABLE_LOOKUP_FAILED,
"%s:%u zebra_vrf_table() returned NULL", __func__,
vrf_id);
return;
table = get_rnh_table(vrfid, PREFIX_FAMILY(p), type);
if (!table) {
prefix2str(p, buf, sizeof(buf));
- flog_warn(ZEBRA_ERR_RNH_NO_TABLE,
+ flog_warn(EC_ZEBRA_RNH_NO_TABLE,
"%u: Add RNH %s type %d - table not found", vrfid,
buf, type);
exists = false;
stream_put(s, &rn->p.u.prefix6, IPV6_MAX_BYTELEN);
break;
default:
- flog_err(ZEBRA_ERR_RNH_UNKNOWN_FAMILY,
+ flog_err(EC_ZEBRA_RNH_UNKNOWN_FAMILY,
"%s: Unknown family (%d) notification attempted\n",
__FUNCTION__, rn->p.family);
break;
if (!mac) {
mac = zvni_mac_add(zvni, macaddr);
if (!mac) {
- flog_err(ZEBRA_ERR_MAC_ADD_FAILED,
+ 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);
n = zvni_neigh_add(zvni, ip, macaddr);
if (!n) {
flog_err(
- ZEBRA_ERR_MAC_ADD_FAILED,
+ EC_ZEBRA_MAC_ADD_FAILED,
"Failed to add neighbor %s MAC %s intf %s(%u) -> VNI %u",
ipaddr2str(ip, buf2, sizeof(buf2)),
prefix_mac2str(macaddr, buf, sizeof(buf)),
n = zvni_neigh_add(zvni, ip, macaddr);
if (!n) {
flog_err(
- ZEBRA_ERR_MAC_ADD_FAILED,
+ EC_ZEBRA_MAC_ADD_FAILED,
"Failed to add neighbor %s MAC %s intf %s(%u) -> VNI %u",
ipaddr2str(ip, buf2, sizeof(buf2)),
prefix_mac2str(macaddr, buf, sizeof(buf)),
/* Delete the hash entry. */
if (zvni_del(zvni)) {
- flog_err(ZEBRA_ERR_VNI_DEL_FAILED,
+ flog_err(EC_ZEBRA_VNI_DEL_FAILED,
"Failed to del VNI hash %p, VNI %u", zvni,
zvni->vni);
return -1;
if (!zvtep) {
if (zvni_vtep_add(zvni, &vtep_ip) == NULL) {
flog_err(
- ZEBRA_ERR_VTEP_ADD_FAILED,
+ EC_ZEBRA_VTEP_ADD_FAILED,
"Failed to add remote VTEP, VNI %u zvni %p upon remote MACIP ADD",
vni, zvni);
return;
mac = zvni_mac_add(zvni, macaddr);
if (!mac) {
flog_err(
- ZEBRA_ERR_MAC_ADD_FAILED,
+ EC_ZEBRA_MAC_ADD_FAILED,
"Failed to add MAC %s intf %s(%u) VID %u VNI %u",
prefix_mac2str(macaddr, buf, sizeof(buf)),
ifp->name, ifp->ifindex, vid, zvni->vni);
*/
if (CHECK_FLAG(mac->flags, ZEBRA_MAC_STICKY)) {
flog_warn(
- ZEBRA_ERR_STICKY_MAC_ALREADY_LEARNT,
+ EC_ZEBRA_STICKY_MAC_ALREADY_LEARNT,
"MAC %s already learnt as remote sticky MAC behind VTEP %s VNI %u",
prefix_mac2str(macaddr, buf,
sizeof(buf)),
zvni = zvni_lookup(vni);
if (!zvni) {
flog_err(
- ZEBRA_ERR_VTEP_ADD_FAILED,
+ EC_ZEBRA_VTEP_ADD_FAILED,
"Failed to locate VNI hash upon remote VTEP ADD, VNI %u",
vni);
continue;
ifp = zvni->vxlan_if;
if (!ifp) {
flog_err(
- ZEBRA_ERR_VTEP_ADD_FAILED,
+ EC_ZEBRA_VTEP_ADD_FAILED,
"VNI %u hash %p doesn't have intf upon remote VTEP ADD",
zvni->vni, zvni);
continue;
continue;
if (zvni_vtep_add(zvni, &vtep_ip) == NULL) {
- flog_err(ZEBRA_ERR_VTEP_ADD_FAILED,
+ flog_err(EC_ZEBRA_VTEP_ADD_FAILED,
"Failed to add remote VTEP, VNI %u zvni %p",
vni, zvni);
continue;
/* Delete the hash entry. */
if (zvni_del(zvni)) {
- flog_err(ZEBRA_ERR_VNI_DEL_FAILED,
+ 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);
return -1;
zvni = zvni_add(vni);
if (!zvni) {
flog_err(
- ZEBRA_ERR_VNI_ADD_FAILED,
+ EC_ZEBRA_VNI_ADD_FAILED,
"Failed to add VNI hash, IF %s(%u) VNI %u",
ifp->name, ifp->ifindex, vni);
return -1;
*/
static void zserv_client_fail(struct zserv *client)
{
- flog_warn(ZEBRA_ERR_CLIENT_IO_ERROR,
+ flog_warn(EC_ZEBRA_CLIENT_IO_ERROR,
"Client '%s' encountered an error and is shutting down.",
zebra_route_string(client->proto));
return 0;
zwrite_fail:
- flog_warn(ZEBRA_ERR_CLIENT_WRITE_FAILED,
+ flog_warn(EC_ZEBRA_CLIENT_WRITE_FAILED,
"%s: could not write to %s [fd = %d], closing.", __func__,
zebra_route_string(client->proto), client->sock);
zserv_client_fail(client);