summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--zebra/connected.c6
-rw-r--r--zebra/if_netlink.c6
-rw-r--r--zebra/if_sysctl.c8
-rw-r--r--zebra/interface.c10
-rw-r--r--zebra/irdp_interface.c8
-rw-r--r--zebra/irdp_packet.c14
-rw-r--r--zebra/kernel_netlink.c16
-rw-r--r--zebra/kernel_socket.c8
-rw-r--r--zebra/label_manager.c22
-rw-r--r--zebra/main.c2
-rw-r--r--zebra/redistribute.c10
-rw-r--r--zebra/rt_netlink.c8
-rw-r--r--zebra/rt_socket.c4
-rw-r--r--zebra/rtadv.c14
-rw-r--r--zebra/rtread_sysctl.c4
-rw-r--r--zebra/rule_netlink.c2
-rw-r--r--zebra/table_manager.c6
-rw-r--r--zebra/zapi_msg.c42
-rw-r--r--zebra/zebra_errors.c178
-rw-r--r--zebra/zebra_errors.h190
-rw-r--r--zebra/zebra_fpm.c6
-rw-r--r--zebra/zebra_mpls.c24
-rw-r--r--zebra/zebra_mpls_openbsd.c2
-rw-r--r--zebra/zebra_netns_id.c6
-rw-r--r--zebra/zebra_netns_notify.c12
-rw-r--r--zebra/zebra_ptm.c6
-rw-r--r--zebra/zebra_rib.c22
-rw-r--r--zebra/zebra_rnh.c4
-rw-r--r--zebra/zebra_vxlan.c24
-rw-r--r--zebra/zserv.c4
30 files changed, 334 insertions, 334 deletions
diff --git a/zebra/connected.c b/zebra/connected.c
index ff9c82883..54f4394a5 100644
--- a/zebra/connected.c
+++ b/zebra/connected.c
@@ -237,7 +237,7 @@ void connected_up(struct interface *ifp, struct connected *ifc)
#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;
@@ -312,7 +312,7 @@ void connected_add_ipv4(struct interface *ifp, int flags, struct in_addr *addr,
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));
@@ -324,7 +324,7 @@ void connected_add_ipv4(struct interface *ifp, int flags, struct in_addr *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,
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index 184c5a4fa..7953c503f 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -350,7 +350,7 @@ static void netlink_vrf_change(struct nlmsghdr *h, struct rtattr *tb,
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;
}
@@ -900,7 +900,7 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup)
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;
@@ -1081,7 +1081,7 @@ int netlink_link_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
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;
diff --git a/zebra/if_sysctl.c b/zebra/if_sysctl.c
index df0831a9f..3f918c361 100644
--- a/zebra/if_sysctl.c
+++ b/zebra/if_sysctl.c
@@ -53,7 +53,7 @@ void ifstat_update_sysctl(void)
/* 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;
}
@@ -63,7 +63,7 @@ void ifstat_update_sysctl(void)
/* 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;
@@ -104,7 +104,7 @@ void interface_list(struct zebra_ns *zns)
/* 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;
@@ -115,7 +115,7 @@ void interface_list(struct zebra_ns *zns)
/* 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;
diff --git a/zebra/interface.c b/zebra/interface.c
index 488980c46..812e36659 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -312,7 +312,7 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc)
/* 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;
@@ -327,7 +327,7 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc)
* 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;
@@ -474,7 +474,7 @@ static void if_addr_wakeup(struct interface *ifp)
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;
@@ -497,7 +497,7 @@ static void if_addr_wakeup(struct interface *ifp)
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;
@@ -891,7 +891,7 @@ void if_up(struct interface *ifp)
/* 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;
diff --git a/zebra/irdp_interface.c b/zebra/irdp_interface.c
index cda6f0e21..f9afe9e65 100644
--- a/zebra/irdp_interface.c
+++ b/zebra/irdp_interface.c
@@ -126,7 +126,7 @@ static int if_group(struct interface *ifp, int sock, uint32_t group,
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;
}
@@ -222,7 +222,7 @@ static void irdp_if_start(struct interface *ifp, int multicast,
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);
@@ -236,7 +236,7 @@ static void irdp_if_start(struct interface *ifp, int multicast,
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);
}
@@ -246,7 +246,7 @@ static void irdp_if_start(struct interface *ifp, int multicast,
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);
}
diff --git a/zebra/irdp_packet.c b/zebra/irdp_packet.c
index 31351b146..60fe3dc63 100644
--- a/zebra/irdp_packet.c
+++ b/zebra/irdp_packet.c
@@ -96,13 +96,13 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
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;
@@ -113,7 +113,7 @@ 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(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;
@@ -124,7 +124,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
/* 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;
@@ -136,7 +136,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
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));
@@ -148,7 +148,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
|| (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
@@ -174,7 +174,7 @@ static void parse_irdp_packet(char *p, int len, struct interface *ifp)
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));
}
diff --git a/zebra/kernel_netlink.c b/zebra/kernel_netlink.c
index 323a6c33f..cfc369dbc 100644
--- a/zebra/kernel_netlink.c
+++ b/zebra/kernel_netlink.c
@@ -286,7 +286,7 @@ static int netlink_information_fetch(struct nlmsghdr *h, ns_id_t ns_id,
* 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);
@@ -653,7 +653,7 @@ static void netlink_parse_extended_ack(struct nlmsghdr *h)
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);
}
}
@@ -710,7 +710,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
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));
/*
@@ -728,7 +728,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
}
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;
@@ -804,7 +804,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
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;
@@ -859,7 +859,7 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
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),
@@ -900,12 +900,12 @@ int netlink_parse_info(int (*filter)(struct nlmsghdr *, ns_id_t, int),
/* 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;
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c
index 5f4158e35..380b0ade1 100644
--- a/zebra/kernel_socket.c
+++ b/zebra/kernel_socket.c
@@ -409,7 +409,7 @@ int ifm_read(struct if_msghdr *ifm)
/* 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;
@@ -728,7 +728,7 @@ int ifam_read(struct ifa_msghdr *ifam)
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;
@@ -823,7 +823,7 @@ static int rtm_read_mesg(struct rt_msghdr *rtm, union sockunion *dest,
/* 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);
@@ -1184,7 +1184,7 @@ int rtm_write(int message, union sockunion *dest, union sockunion *mask,
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;
diff --git a/zebra/label_manager.c b/zebra/label_manager.c
index 793d6cfa1..442126e6d 100644
--- a/zebra/label_manager.c
+++ b/zebra/label_manager.c
@@ -83,7 +83,7 @@ static int relay_response_back(void)
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;
@@ -104,7 +104,7 @@ static int relay_response_back(void)
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;
@@ -119,7 +119,7 @@ static int relay_response_back(void)
/* 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;
@@ -187,7 +187,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
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;
@@ -209,7 +209,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
/* 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;
@@ -217,7 +217,7 @@ 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(ZEBRA_ERR_LM_BAD_INSTANCE,
+ flog_err(EC_ZEBRA_LM_BAD_INSTANCE,
"Client instance(%u) != msg instance(%u)",
zserv->instance, instance);
return -1;
@@ -240,7 +240,7 @@ int zread_relay_label_manager_request(int cmd, struct zserv *zserv,
/* 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);
@@ -270,7 +270,7 @@ static int lm_zclient_connect(struct thread *t)
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);
@@ -400,7 +400,7 @@ struct label_manager_chunk *assign_label_chunk(uint8_t proto,
->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);
@@ -440,7 +440,7 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
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;
}
@@ -451,7 +451,7 @@ int release_label_chunk(uint8_t proto, unsigned short instance, uint32_t start,
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;
diff --git a/zebra/main.c b/zebra/main.c
index 8db1c48f2..c46f8bb95 100644
--- a/zebra/main.c
+++ b/zebra/main.c
@@ -292,7 +292,7 @@ int main(int argc, char **argv)
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;
diff --git a/zebra/redistribute.c b/zebra/redistribute.c
index f30255355..f48fc6add 100644
--- a/zebra/redistribute.c
+++ b/zebra/redistribute.c
@@ -167,7 +167,7 @@ void redistribute_update(const struct prefix *p, const struct prefix *src_p,
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;
@@ -238,7 +238,7 @@ void redistribute_delete(const struct prefix *p, const struct prefix *src_p,
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;
@@ -278,7 +278,7 @@ void zebra_redistribute_add(ZAPI_HANDLER_ARGS)
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;
@@ -325,7 +325,7 @@ void zebra_redistribute_delete(ZAPI_HANDLER_ARGS)
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;
@@ -450,7 +450,7 @@ void zebra_interface_address_add_update(struct interface *ifp,
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);
diff --git a/zebra/rt_netlink.c b/zebra/rt_netlink.c
index 70bd8a784..7d4c68cc0 100644
--- a/zebra/rt_netlink.c
+++ b/zebra/rt_netlink.c
@@ -435,7 +435,7 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
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;
@@ -605,7 +605,7 @@ static int netlink_route_change_read_unicast(struct nlmsghdr *h, ns_id_t ns_id,
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);
@@ -834,7 +834,7 @@ int netlink_route_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
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;
@@ -2486,7 +2486,7 @@ int netlink_neigh_change(struct nlmsghdr *h, ns_id_t ns_id)
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;
diff --git a/zebra/rt_socket.c b/zebra/rt_socket.c
index 2ee450dd9..18328d380 100644
--- a/zebra/rt_socket.c
+++ b/zebra/rt_socket.c
@@ -73,7 +73,7 @@ static int kernel_rtm_add_labels(struct mpls_label_stack *nh_label,
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);
@@ -400,7 +400,7 @@ enum dp_req_result kernel_route_rib(struct route_node *rn,
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;
}
diff --git a/zebra/rtadv.c b/zebra/rtadv.c
index 696190492..08770176e 100644
--- a/zebra/rtadv.c
+++ b/zebra/rtadv.c
@@ -485,7 +485,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
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);
}
@@ -493,7 +493,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
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);
}
@@ -501,7 +501,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
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);
}
@@ -510,7 +510,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
&& (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);
}
@@ -519,7 +519,7 @@ static void rtadv_process_advert(uint8_t *msg, unsigned int len,
&& (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);
}
@@ -549,7 +549,7 @@ static void rtadv_process_packet(uint8_t *buf, unsigned int len,
/* 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;
@@ -830,7 +830,7 @@ static void zebra_interface_radv_set(ZAPI_HANDLER_ARGS, int enable)
/* 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));
diff --git a/zebra/rtread_sysctl.c b/zebra/rtread_sysctl.c
index 5f6b62df2..f88586a6e 100644
--- a/zebra/rtread_sysctl.c
+++ b/zebra/rtread_sysctl.c
@@ -48,7 +48,7 @@ void route_read(struct zebra_ns *zns)
/* 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;
}
@@ -58,7 +58,7 @@ void route_read(struct zebra_ns *zns)
/* 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;
diff --git a/zebra/rule_netlink.c b/zebra/rule_netlink.c
index 4244a9af8..518d81dd6 100644
--- a/zebra/rule_netlink.c
+++ b/zebra/rule_netlink.c
@@ -207,7 +207,7 @@ int netlink_rule_change(struct nlmsghdr *h, ns_id_t ns_id, int startup)
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;
diff --git a/zebra/table_manager.c b/zebra/table_manager.c
index 43b5c7d59..05cf37f94 100644
--- a/zebra/table_manager.c
+++ b/zebra/table_manager.c
@@ -147,7 +147,7 @@ struct table_manager_chunk *assign_table_chunk(uint8_t proto, uint16_t instance,
#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);
@@ -186,7 +186,7 @@ int release_table_chunk(uint8_t proto, uint16_t instance, uint32_t start,
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;
}
@@ -196,7 +196,7 @@ int release_table_chunk(uint8_t proto, uint16_t instance, uint32_t start,
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;
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c
index e4fbb7362..d189b84e7 100644
--- a/zebra/zapi_msg.c
+++ b/zebra/zapi_msg.c
@@ -1061,7 +1061,7 @@ static void zread_rnh_register(ZAPI_HANDLER_ARGS)
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;
@@ -1145,7 +1145,7 @@ static void zread_rnh_unregister(ZAPI_HANDLER_ARGS)
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;
@@ -1182,7 +1182,7 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS)
*/
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;
@@ -1194,7 +1194,7 @@ static void zread_fec_register(ZAPI_HANDLER_ARGS)
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;
@@ -1242,7 +1242,7 @@ static void zread_fec_unregister(ZAPI_HANDLER_ARGS)
*/
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;
@@ -1257,7 +1257,7 @@ static void zread_fec_unregister(ZAPI_HANDLER_ARGS)
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;
@@ -1320,7 +1320,7 @@ void zserv_nexthop_num_warn(const char *caller, const struct prefix *p,
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);
}
@@ -1484,7 +1484,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
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);
@@ -1524,7 +1524,7 @@ static void zread_route_add(ZAPI_HANDLER_ARGS)
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);
@@ -1567,7 +1567,7 @@ static void zread_route_del(ZAPI_HANDLER_ARGS)
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;
@@ -1786,7 +1786,7 @@ 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(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);
@@ -1826,7 +1826,7 @@ 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(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);
@@ -1856,7 +1856,7 @@ static int msg_client_id_mismatch(const char *op, struct zserv *client,
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 */
@@ -1865,7 +1865,7 @@ static int msg_client_id_mismatch(const char *op, struct zserv *client,
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 */
@@ -1901,7 +1901,7 @@ static void zread_get_label_chunk(struct zserv *client, struct stream *msg,
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);
@@ -1960,7 +1960,7 @@ static void zread_label_manager_request(ZAPI_HANDLER_ARGS)
/* 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;
}
@@ -1988,7 +1988,7 @@ 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(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
@@ -2028,7 +2028,7 @@ static void zread_table_manager_request(ZAPI_HANDLER_ARGS)
/* 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;
}
@@ -2082,7 +2082,7 @@ static void zread_pseudowire(ZAPI_HANDLER_ARGS)
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));
@@ -2093,7 +2093,7 @@ static void zread_pseudowire(ZAPI_HANDLER_ARGS)
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;
@@ -2104,7 +2104,7 @@ static void zread_pseudowire(ZAPI_HANDLER_ARGS)
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;
diff --git a/zebra/zebra_errors.c b/zebra/zebra_errors.c
index 79d9caf11..17163e218 100644
--- a/zebra/zebra_errors.c
+++ b/zebra/zebra_errors.c
@@ -26,260 +26,260 @@
/* 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 =
@@ -288,7 +288,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -297,7 +297,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -306,7 +306,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -315,7 +315,7 @@ static struct log_ref ferr_zebra_err[] = {
"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.",
@@ -323,7 +323,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -331,7 +331,7 @@ static struct log_ref ferr_zebra_err[] = {
.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 =
@@ -339,7 +339,7 @@ static struct log_ref ferr_zebra_err[] = {
.suggestion = "Please report this bug.",
},
{
- .code = ZEBRA_ERR_IFLIST_FAILED,
+ .code = EC_ZEBRA_IFLIST_FAILED,
.title =
"Zebra interface listing failed",
.description =
@@ -348,7 +348,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -357,7 +357,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -366,7 +366,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -375,7 +375,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -383,7 +383,7 @@ static struct log_ref ferr_zebra_err[] = {
.suggestion = "asdf",
},
{
- .code = ZEBRA_ERR_RNH_NO_TABLE,
+ .code = EC_ZEBRA_RNH_NO_TABLE,
.title =
"Zebra could not find table for next hop",
.description =
@@ -391,7 +391,7 @@ static struct log_ref ferr_zebra_err[] = {
.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 =
@@ -400,7 +400,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -409,7 +409,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -418,7 +418,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -427,7 +427,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -436,7 +436,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -445,7 +445,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -454,7 +454,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -463,7 +463,7 @@ static struct log_ref ferr_zebra_err[] = {
"Check configuration values for correctness",
},
{
- .code = ZEBRA_ERR_UNKNOWN_INTERFACE,
+ .code = EC_ZEBRA_UNKNOWN_INTERFACE,
.title =
"Zebra encountered an unknown interface specifier",
.description =
@@ -472,7 +472,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -481,7 +481,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -490,7 +490,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -499,7 +499,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -508,7 +508,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -517,7 +517,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -526,7 +526,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -535,7 +535,7 @@ static struct log_ref ferr_zebra_err[] = {
"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.",
@@ -543,7 +543,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -552,7 +552,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -561,7 +561,7 @@ static struct log_ref ferr_zebra_err[] = {
"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.",
@@ -569,7 +569,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -578,7 +578,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -587,7 +587,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -596,7 +596,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -605,7 +605,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -614,7 +614,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -623,7 +623,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -632,7 +632,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -641,7 +641,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -650,7 +650,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -659,7 +659,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -668,7 +668,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -677,7 +677,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
@@ -686,7 +686,7 @@ static struct log_ref ferr_zebra_err[] = {
"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 =
diff --git a/zebra/zebra_errors.h b/zebra/zebra_errors.h
index 650f74871..43e37c6e5 100644
--- a/zebra/zebra_errors.h
+++ b/zebra/zebra_errors.h
@@ -18,107 +18,107 @@
* 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_MISMATCH,
- ZEBRA_ERR_TM_UNRELEASED_CHUNK,
- ZEBRA_ERR_UNKNOWN_FAMILY,
- ZEBRA_ERR_TM_WRONG_PROTO,
- ZEBRA_ERR_PROTO_OR_INSTANCE_MISMATCH,
- ZEBRA_ERR_LM_CANNOT_ASSIGN_CHUNK,
- ZEBRA_ERR_LM_ALIENS,
- ZEBRA_ERR_TM_CANNOT_ASSIGN_CHUNK,
- ZEBRA_ERR_TM_ALIENS,
- ZEBRA_ERR_RECVBUF,
- ZEBRA_ERR_UNKNOWN_NLMSG,
- ZEBRA_ERR_RECVMSG_OVERRUN,
- ZEBRA_ERR_NETLINK_LENGTH_ERROR,
- ZEBRA_ERR_UNEXPECTED_MESSAGE,
- ZEBRA_ERR_NETLINK_BAD_SEQUENCE,
- ZEBRA_ERR_BAD_MULTIPATH_NUM,
- ZEBRA_ERR_PREFIX_PARSE_ERROR,
- ZEBRA_ERR_MAC_ADD_FAILED,
- ZEBRA_ERR_VNI_DEL_FAILED,
- ZEBRA_ERR_VTEP_ADD_FAILED,
- ZEBRA_ERR_VNI_ADD_FAILED,
+ EC_ZEBRA_LM_RESPONSE = ZEBRA_FERR_START,
+ EC_ZEBRA_LM_NO_SUCH_CLIENT,
+ EC_ZEBRA_LM_RELAY_FAILED,
+ EC_ZEBRA_LM_NO_SOCKET,
+ EC_ZEBRA_LM_BAD_INSTANCE,
+ EC_ZEBRA_LM_RELAY_REQUEST_FAILED,
+ EC_ZEBRA_LM_CLIENT_CONNECTION_FAILED,
+ EC_ZEBRA_LM_EXHAUSTED_LABELS,
+ EC_ZEBRA_LM_DAEMON_MISMATCH,
+ EC_ZEBRA_LM_UNRELEASED_CHUNK,
+ EC_ZEBRA_DP_INVALID_RC,
+ EC_ZEBRA_WQ_NONEXISTENT,
+ EC_ZEBRA_FEC_ADD_FAILED,
+ EC_ZEBRA_FEC_RM_FAILED,
+ EC_ZEBRA_IRDP_LEN_MISMATCH,
+ EC_ZEBRA_RNH_UNKNOWN_FAMILY,
+ EC_ZEBRA_DP_INSTALL_FAIL,
+ EC_ZEBRA_DP_DELETE_FAIL,
+ EC_ZEBRA_TABLE_LOOKUP_FAILED,
+ EC_ZEBRA_NETLINK_NOT_AVAILABLE,
+ EC_ZEBRA_PROTOBUF_NOT_AVAILABLE,
+ EC_ZEBRA_TM_EXHAUSTED_IDS,
+ EC_ZEBRA_TM_DAEMON_MISMATCH,
+ EC_ZEBRA_TM_UNRELEASED_CHUNK,
+ EC_ZEBRA_UNKNOWN_FAMILY,
+ EC_ZEBRA_TM_WRONG_PROTO,
+ EC_ZEBRA_PROTO_OR_INSTANCE_MISMATCH,
+ EC_ZEBRA_LM_CANNOT_ASSIGN_CHUNK,
+ EC_ZEBRA_LM_ALIENS,
+ EC_ZEBRA_TM_CANNOT_ASSIGN_CHUNK,
+ EC_ZEBRA_TM_ALIENS,
+ EC_ZEBRA_RECVBUF,
+ EC_ZEBRA_UNKNOWN_NLMSG,
+ EC_ZEBRA_RECVMSG_OVERRUN,
+ EC_ZEBRA_NETLINK_LENGTH_ERROR,
+ EC_ZEBRA_UNEXPECTED_MESSAGE,
+ EC_ZEBRA_NETLINK_BAD_SEQUENCE,
+ EC_ZEBRA_BAD_MULTIPATH_NUM,
+ EC_ZEBRA_PREFIX_PARSE_ERROR,
+ EC_ZEBRA_MAC_ADD_FAILED,
+ EC_ZEBRA_VNI_DEL_FAILED,
+ EC_ZEBRA_VTEP_ADD_FAILED,
+ EC_ZEBRA_VNI_ADD_FAILED,
/* warnings */
- ZEBRA_ERR_NS_NOTIFY_READ,
- ZEBRA_WARNING_LM_PROTO_MISMATCH,
- ZEBRA_ERR_LSP_INSTALL_FAILURE,
- ZEBRA_ERR_LSP_DELETE_FAILURE,
- ZEBRA_ERR_MPLS_SUPPORT_DISABLED,
- ZEBRA_ERR_SYSCTL_FAILED,
- ZEBRA_ERR_CONVERT_TO_DEBUG,
- ZEBRA_ERR_NS_VRF_CREATION_FAILED,
- ZEBRA_ERR_NS_DELETION_FAILED_NO_VRF,
- ZEBRA_ERR_IRDP_BAD_CHECKSUM,
- ZEBRA_ERR_IRDP_BAD_TYPE_CODE,
- ZEBRA_ERR_IRDP_BAD_RX_FLAGS,
- ZEBRA_ERR_IRDP_BAD_TYPE,
- ZEBRA_ERR_RNH_NO_TABLE,
- ZEBRA_ERR_IFLIST_FAILED,
- ZEBRA_ERR_FPM_FORMAT_UNKNOWN,
- ZEBRA_ERR_CLIENT_IO_ERROR,
- ZEBRA_ERR_CLIENT_WRITE_FAILED,
- ZEBRA_ERR_NETLINK_INVALID_AF,
- ZEBRA_ERR_REMOVE_ADDR_UNKNOWN_SUBNET,
- ZEBRA_ERR_REMOVE_UNREGISTERED_ADDR,
- ZEBRA_ERR_PTM_NOT_READY,
- ZEBRA_ERR_UNSUPPORTED_V4_SRCDEST,
- ZEBRA_ERR_UNKNOWN_INTERFACE,
- ZEBRA_ERR_VRF_NOT_FOUND,
- ZEBRA_ERR_MORE_NH_THAN_MULTIPATH,
- ZEBRA_ERR_NEXTHOP_CREATION_FAILED,
- ZEBRA_ERR_RX_SRCDEST_WRONG_AFI,
- ZEBRA_ERR_PSEUDOWIRE_EXISTS,
- ZEBRA_ERR_PSEUDOWIRE_UNINSTALL_NOT_FOUND,
- ZEBRA_ERR_PSEUDOWIRE_NONEXISTENT,
- ZEBRA_ERR_NO_IFACE_ADDR,
- ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
- ZEBRA_ERR_IRDP_CANNOT_ACTIVATE_IFACE,
- ZEBRA_ERR_IRDP_IFACE_DOWN,
- ZEBRA_ERR_IRDP_IFACE_MCAST_DISABLED,
- ZEBRA_ERR_NETLINK_EXTENDED_WARNING,
- ZEBRA_ERR_NAMESPACE_DIR_INACCESSIBLE,
- ZEBRA_ERR_CONNECTED_AFI_UNKNOWN,
- ZEBRA_ERR_IFACE_SAME_LOCAL_AS_PEER,
- ZEBRA_ERR_BCAST_ADDR_MISMATCH,
- ZEBRA_ERR_REDISTRIBUTE_UNKNOWN_AF,
- ZEBRA_ERR_ADVERTISING_UNUSABLE_ADDR,
- ZEBRA_ERR_RA_PARAM_MISMATCH,
- ZEBRA_ERR_RTM_VERSION_MISMATCH,
- ZEBRA_ERR_RTM_NO_GATEWAY,
- ZEBRA_ERR_MAX_LABELS_PUSH,
- ZEBRA_ERR_STICKY_MAC_ALREADY_LEARNT,
- ZEBRA_ERR_UNSUPPORTED_V6_SRCDEST,
+ EC_ZEBRA_NS_NOTIFY_READ,
+ EC_ZEBRAING_LM_PROTO_MISMATCH,
+ EC_ZEBRA_LSP_INSTALL_FAILURE,
+ EC_ZEBRA_LSP_DELETE_FAILURE,
+ EC_ZEBRA_MPLS_SUPPORT_DISABLED,
+ EC_ZEBRA_SYSCTL_FAILED,
+ EC_ZEBRA_CONVERT_TO_DEBUG,
+ EC_ZEBRA_NS_VRF_CREATION_FAILED,
+ EC_ZEBRA_NS_DELETION_FAILED_NO_VRF,
+ EC_ZEBRA_IRDP_BAD_CHECKSUM,
+ EC_ZEBRA_IRDP_BAD_TYPE_CODE,
+ EC_ZEBRA_IRDP_BAD_RX_FLAGS,
+ EC_ZEBRA_IRDP_BAD_TYPE,
+ EC_ZEBRA_RNH_NO_TABLE,
+ EC_ZEBRA_IFLIST_FAILED,
+ EC_ZEBRA_FPM_FORMAT_UNKNOWN,
+ EC_ZEBRA_CLIENT_IO_ERROR,
+ EC_ZEBRA_CLIENT_WRITE_FAILED,
+ EC_ZEBRA_NETLINK_INVALID_AF,
+ EC_ZEBRA_REMOVE_ADDR_UNKNOWN_SUBNET,
+ EC_ZEBRA_REMOVE_UNREGISTERED_ADDR,
+ EC_ZEBRA_PTM_NOT_READY,
+ EC_ZEBRA_UNSUPPORTED_V4_SRCDEST,
+ EC_ZEBRA_UNKNOWN_INTERFACE,
+ EC_ZEBRA_VRF_NOT_FOUND,
+ EC_ZEBRA_MORE_NH_THAN_MULTIPATH,
+ EC_ZEBRA_NEXTHOP_CREATION_FAILED,
+ EC_ZEBRA_RX_SRCDEST_WRONG_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__ */
diff --git a/zebra/zebra_fpm.c b/zebra/zebra_fpm.c
index dae37cbd3..13a2b6f51 100644
--- a/zebra/zebra_fpm.c
+++ b/zebra/zebra_fpm.c
@@ -1519,7 +1519,7 @@ static inline void zfpm_init_message_format(const char *format)
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;
}
@@ -1530,7 +1530,7 @@ static inline void zfpm_init_message_format(const char *format)
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;
}
@@ -1538,7 +1538,7 @@ static inline void zfpm_init_message_format(const char *format)
return;
}
- flog_warn(ZEBRA_ERR_FPM_FORMAT_UNKNOWN, "Unknown fpm format '%s'",
+ flog_warn(EC_ZEBRA_FPM_FORMAT_UNKNOWN, "Unknown fpm format '%s'",
format);
}
diff --git a/zebra/zebra_mpls.c b/zebra/zebra_mpls.c
index 9a76408bb..cf23d90f9 100644
--- a/zebra/zebra_mpls.c
+++ b/zebra/zebra_mpls.c
@@ -919,7 +919,7 @@ static wq_item_status lsp_process(struct work_queue *wq, void *data)
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:
@@ -936,7 +936,7 @@ static wq_item_status lsp_process(struct work_queue *wq, void *data)
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:
@@ -976,7 +976,7 @@ static wq_item_status lsp_process(struct work_queue *wq, void *data)
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:
@@ -1055,7 +1055,7 @@ static int lsp_processq_add(zebra_lsp_t *lsp)
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;
}
@@ -1698,7 +1698,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(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: could not initialise work queue!", __func__);
return -1;
}
@@ -1728,7 +1728,7 @@ void kernel_lsp_pass_fail(zebra_lsp_t *lsp, enum dp_results res)
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:
@@ -1747,7 +1747,7 @@ void kernel_lsp_pass_fail(zebra_lsp_t *lsp, enum dp_results res)
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;
}
@@ -1837,7 +1837,7 @@ int zebra_mpls_fec_register(struct zebra_vrf *zvrf, struct prefix *p,
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;
@@ -1917,7 +1917,7 @@ int zebra_mpls_fec_unregister(struct zebra_vrf *zvrf, struct prefix *p,
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;
@@ -2049,7 +2049,7 @@ int zebra_mpls_static_fec_add(struct zebra_vrf *zvrf, struct prefix *p,
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;
}
@@ -2097,7 +2097,7 @@ int zebra_mpls_static_fec_del(struct zebra_vrf *zvrf, struct prefix *p)
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;
}
@@ -2947,7 +2947,7 @@ void zebra_mpls_init(void)
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;
}
diff --git a/zebra/zebra_mpls_openbsd.c b/zebra/zebra_mpls_openbsd.c
index b42cf3243..e11e8a373 100644
--- a/zebra/zebra_mpls_openbsd.c
+++ b/zebra/zebra_mpls_openbsd.c
@@ -257,7 +257,7 @@ static int kernel_lsp_cmd(int action, zebra_lsp_t *lsp)
&& (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__,
diff --git a/zebra/zebra_netns_id.c b/zebra/zebra_netns_id.c
index 9921ce017..14848f61a 100644
--- a/zebra/zebra_netns_id.c
+++ b/zebra/zebra_netns_id.c
@@ -115,14 +115,14 @@ static int send_receive(int sock, struct nlmsghdr *nlh, unsigned int seq,
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;
@@ -337,7 +337,7 @@ static void zebra_ns_create_netns_directory(void)
/* 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;
}
diff --git a/zebra/zebra_netns_notify.c b/zebra/zebra_netns_notify.c
index be36dc96b..29defa715 100644
--- a/zebra/zebra_netns_notify.c
+++ b/zebra/zebra_netns_notify.c
@@ -92,7 +92,7 @@ static void zebra_ns_notify_create_context_from_entry_name(const char *name)
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;
@@ -102,7 +102,7 @@ static void zebra_ns_notify_create_context_from_entry_name(const char *name)
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);
@@ -133,7 +133,7 @@ static int zebra_ns_delete(char *name)
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;
}
@@ -239,7 +239,7 @@ static int zebra_ns_notify_read(struct thread *t)
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;
@@ -257,13 +257,13 @@ static int zebra_ns_notify_read(struct thread *t)
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;
}
diff --git a/zebra/zebra_ptm.c b/zebra/zebra_ptm.c
index 7f9b70b0a..f1fa8cc67 100644
--- a/zebra/zebra_ptm.c
+++ b/zebra/zebra_ptm.c
@@ -505,7 +505,7 @@ static int zebra_ptm_handle_bfd_msg(void *arg, void *in_ctxt,
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;
}
@@ -513,7 +513,7 @@ static int zebra_ptm_handle_bfd_msg(void *arg, void *in_ctxt,
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;
@@ -609,7 +609,7 @@ static int zebra_ptm_handle_msg_cb(void *arg, void *in_ctxt)
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;
diff --git a/zebra/zebra_rib.c b/zebra/zebra_rib.c
index 2eb789d74..ec5f25356 100644
--- a/zebra/zebra_rib.c
+++ b/zebra/zebra_rib.c
@@ -1091,7 +1091,7 @@ void kernel_route_rib_pass_fail(struct route_node *rn, const struct prefix *p,
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;
@@ -1116,7 +1116,7 @@ void kernel_route_rib_pass_fail(struct route_node *rn, const struct prefix *p,
* 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)));
@@ -1174,12 +1174,12 @@ void rib_install_kernel(struct route_node *rn, struct route_entry *re,
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:
@@ -1214,12 +1214,12 @@ void rib_uninstall_kernel(struct route_node *rn, struct route_entry *re)
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:
@@ -2012,7 +2012,7 @@ void rib_queue_add(struct route_node *rn)
}
if (zebrad.ribq == NULL) {
- flog_err(ZEBRA_ERR_WQ_NONEXISTENT,
+ flog_err(EC_ZEBRA_WQ_NONEXISTENT,
"%s: work_queue does not exist!", __func__);
return;
}
@@ -2068,7 +2068,7 @@ static void rib_queue_init(struct zebra_t *zebra)
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;
}
@@ -2082,7 +2082,7 @@ static void rib_queue_init(struct zebra_t *zebra)
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;
}
@@ -2333,7 +2333,7 @@ void rib_lookup_and_dump(struct prefix_ipv4 *p, vrf_id_t vrf_id)
/* 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;
@@ -2381,7 +2381,7 @@ void rib_lookup_and_pushup(struct prefix_ipv4 *p, vrf_id_t vrf_id)
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;
diff --git a/zebra/zebra_rnh.c b/zebra/zebra_rnh.c
index e9c2a4d7f..e9ef30c64 100644
--- a/zebra/zebra_rnh.c
+++ b/zebra/zebra_rnh.c
@@ -118,7 +118,7 @@ struct rnh *zebra_add_rnh(struct prefix *p, vrf_id_t vrfid, rnh_type_t type,
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;
@@ -871,7 +871,7 @@ static int send_client(struct rnh *rnh, struct zserv *client, rnh_type_t type,
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;
diff --git a/zebra/zebra_vxlan.c b/zebra/zebra_vxlan.c
index a0a90ac28..15a7747b2 100644
--- a/zebra/zebra_vxlan.c
+++ b/zebra/zebra_vxlan.c
@@ -1772,7 +1772,7 @@ static int zvni_gw_macip_add(struct interface *ifp, zebra_vni_t *zvni,
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);
@@ -1793,7 +1793,7 @@ static int zvni_gw_macip_add(struct interface *ifp, zebra_vni_t *zvni,
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)),
@@ -2014,7 +2014,7 @@ static int zvni_local_neigh_update(zebra_vni_t *zvni,
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)),
@@ -3933,7 +3933,7 @@ static int zebra_vxlan_handle_vni_transition(struct zebra_vrf *zvrf, vni_t vni,
/* 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;
@@ -4076,7 +4076,7 @@ static void process_remote_macip_add(vni_t vni,
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;
@@ -5777,7 +5777,7 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
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);
@@ -5846,7 +5846,7 @@ int zebra_vxlan_local_mac_add_update(struct interface *ifp,
*/
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)),
@@ -6021,7 +6021,7 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
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;
@@ -6030,7 +6030,7 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
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;
@@ -6048,7 +6048,7 @@ void zebra_vxlan_remote_vtep_add(ZAPI_HANDLER_ARGS)
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;
@@ -6469,7 +6469,7 @@ int zebra_vxlan_if_del(struct interface *ifp)
/* 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;
@@ -6686,7 +6686,7 @@ int zebra_vxlan_if_add(struct interface *ifp)
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;
diff --git a/zebra/zserv.c b/zebra/zserv.c
index d1d6a2d3f..a013d8dd5 100644
--- a/zebra/zserv.c
+++ b/zebra/zserv.c
@@ -172,7 +172,7 @@ static void zserv_log_message(const char *errmsg, struct stream *msg,
*/
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));
@@ -272,7 +272,7 @@ static int zserv_write(struct thread *thread)
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);