diff options
author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-13 21:34:28 +0200 |
---|---|---|
committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-09-13 21:34:28 +0200 |
commit | 450971aa994e68f7c62c4d45065223d5cfc4a22f (patch) | |
tree | 0128a1e596823272333d8a6616dd2575e8d7c46b /pimd | |
parent | zebra: ZEBRA_[ERR|WARN] -> EC_ZEBRA (diff) | |
download | frr-450971aa994e68f7c62c4d45065223d5cfc4a22f.tar.xz frr-450971aa994e68f7c62c4d45065223d5cfc4a22f.zip |
*: LIB_[ERR|WARN] -> EC_LIB
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'pimd')
-rw-r--r-- | pimd/pim_igmp.c | 4 | ||||
-rw-r--r-- | pimd/pim_igmpv3.c | 2 | ||||
-rw-r--r-- | pimd/pim_msdp.c | 2 | ||||
-rw-r--r-- | pimd/pim_msdp_packet.c | 2 | ||||
-rw-r--r-- | pimd/pim_msdp_socket.c | 26 | ||||
-rw-r--r-- | pimd/pim_neighbor.c | 2 | ||||
-rw-r--r-- | pimd/pim_rp.c | 6 | ||||
-rw-r--r-- | pimd/pim_sock.c | 4 | ||||
-rw-r--r-- | pimd/pim_ssm.c | 2 | ||||
-rw-r--r-- | pimd/pim_ssmpingd.c | 4 | ||||
-rw-r--r-- | pimd/pim_time.c | 8 | ||||
-rw-r--r-- | pimd/pim_zlookup.c | 16 | ||||
-rw-r--r-- | pimd/pimd.c | 2 |
13 files changed, 40 insertions, 40 deletions
diff --git a/pimd/pim_igmp.c b/pimd/pim_igmp.c index 270f1e3f2..64537cfa8 100644 --- a/pimd/pim_igmp.c +++ b/pimd/pim_igmp.c @@ -98,7 +98,7 @@ static int igmp_sock_open(struct in_addr ifaddr, struct interface *ifp, if (!join) { flog_err_sys( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "IGMP socket fd=%d could not join any group on interface address %s", fd, inet_ntoa(ifaddr)); close(fd); @@ -700,7 +700,7 @@ static void sock_close(struct igmp_sock *igmp) if (close(igmp->fd)) { flog_err( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "Failure closing IGMP socket %s fd=%d on interface %s: errno=%d: %s", inet_ntoa(igmp->ifaddr), igmp->fd, igmp->interface->name, errno, safe_strerror(errno)); diff --git a/pimd/pim_igmpv3.c b/pimd/pim_igmpv3.c index 7b21376c9..430cba76b 100644 --- a/pimd/pim_igmpv3.c +++ b/pimd/pim_igmpv3.c @@ -1585,7 +1585,7 @@ void igmp_v3_send_query(struct igmp_group *group, int fd, const char *ifname, msg_size = IGMP_V3_SOURCES_OFFSET + (num_sources << 2); if (msg_size > query_buf_size) { flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "%s %s: unable to send: msg_size=%zd larger than query_buf_size=%d", __FILE__, __PRETTY_FUNCTION__, msg_size, query_buf_size); diff --git a/pimd/pim_msdp.c b/pimd/pim_msdp.c index 7fcf42e8c..8c6c43edf 100644 --- a/pimd/pim_msdp.c +++ b/pimd/pim_msdp.c @@ -519,7 +519,7 @@ static void pim_msdp_sa_local_del_on_up_del(struct pim_instance *pim, * changes; perhaps * address this in the next release? - XXX */ flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "MSDP sa %s SPT teardown is causing the local entry to be removed", sa->sg_str); return; diff --git a/pimd/pim_msdp_packet.c b/pimd/pim_msdp_packet.c index 7875f05c9..6208eaef2 100644 --- a/pimd/pim_msdp_packet.c +++ b/pimd/pim_msdp_packet.c @@ -147,7 +147,7 @@ static void pim_msdp_connect_check(struct pim_msdp_peer *mp) /* If getsockopt is fail, this is fatal error. */ if (ret < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "can't get sockopt for nonblocking connect"); pim_msdp_peer_reset_tcp_conn(mp, "connect-failed"); return; diff --git a/pimd/pim_msdp_socket.c b/pimd/pim_msdp_socket.c index 4271f5e61..a521ed568 100644 --- a/pimd/pim_msdp_socket.c +++ b/pimd/pim_msdp_socket.c @@ -43,7 +43,7 @@ static void pim_msdp_update_sock_send_buffer_size(int fd) socklen_t optlen = sizeof(optval); if (getsockopt(fd, SOL_SOCKET, SO_SNDBUF, &optval, &optlen) < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "getsockopt of SO_SNDBUF failed %s\n", safe_strerror(errno)); return; @@ -52,7 +52,7 @@ static void pim_msdp_update_sock_send_buffer_size(int fd) if (optval < size) { if (setsockopt(fd, SOL_SOCKET, SO_SNDBUF, &size, sizeof(size)) < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "Couldn't increase send buffer: %s\n", safe_strerror(errno)); } @@ -74,7 +74,7 @@ static int pim_msdp_sock_accept(struct thread *thread) /* re-register accept thread */ accept_sock = THREAD_FD(thread); if (accept_sock < 0) { - flog_err(LIB_ERR_DEVELOPMENT, + flog_err(EC_LIB_DEVELOPMENT, "accept_sock is negative value %d", accept_sock); return -1; } @@ -85,7 +85,7 @@ static int pim_msdp_sock_accept(struct thread *thread) /* accept client connection. */ msdp_sock = sockunion_accept(accept_sock, &su); if (msdp_sock < 0) { - flog_err_sys(LIB_ERR_SOCKET, "pim_msdp_sock_accept failed (%s)", + flog_err_sys(EC_LIB_SOCKET, "pim_msdp_sock_accept failed (%s)", safe_strerror(errno)); return -1; } @@ -141,7 +141,7 @@ int pim_msdp_sock_listen(struct pim_instance *pim) sock = socket(AF_INET, SOCK_STREAM, 0); if (sock < 0) { - flog_err_sys(LIB_ERR_SOCKET, "socket: %s", + flog_err_sys(EC_LIB_SOCKET, "socket: %s", safe_strerror(errno)); return sock; } @@ -161,14 +161,14 @@ int pim_msdp_sock_listen(struct pim_instance *pim) struct interface *ifp = if_lookup_by_name(pim->vrf->name, pim->vrf_id); if (!ifp) { - flog_err(LIB_ERR_INTERFACE, + flog_err(EC_LIB_INTERFACE, "%s: Unable to lookup vrf interface: %s", __PRETTY_FUNCTION__, pim->vrf->name); close(sock); return -1; } if (pim_socket_bind(sock, ifp)) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Unable to bind to socket: %s", __PRETTY_FUNCTION__, safe_strerror(errno)); close(sock); @@ -182,7 +182,7 @@ int pim_msdp_sock_listen(struct pim_instance *pim) } if (rc < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "pim_msdp_socket bind to port %d: %s", ntohs(sin.sin_port), safe_strerror(errno)); close(sock); @@ -191,7 +191,7 @@ int pim_msdp_sock_listen(struct pim_instance *pim) rc = listen(sock, 3 /* backlog */); if (rc < 0) { - flog_err_sys(LIB_ERR_SOCKET, "pim_msdp_socket listen: %s", + flog_err_sys(EC_LIB_SOCKET, "pim_msdp_socket listen: %s", safe_strerror(errno)); close(sock); return rc; @@ -232,7 +232,7 @@ int pim_msdp_sock_connect(struct pim_msdp_peer *mp) /* Make socket for the peer. */ mp->fd = sockunion_socket(&mp->su_peer); if (mp->fd < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "pim_msdp_socket socket failure: %s", safe_strerror(errno)); return -1; @@ -242,13 +242,13 @@ int pim_msdp_sock_connect(struct pim_msdp_peer *mp) struct interface *ifp = if_lookup_by_name(mp->pim->vrf->name, mp->pim->vrf_id); if (!ifp) { - flog_err(LIB_ERR_INTERFACE, + flog_err(EC_LIB_INTERFACE, "%s: Unable to lookup vrf interface: %s", __PRETTY_FUNCTION__, mp->pim->vrf->name); return -1; } if (pim_socket_bind(mp->fd, ifp)) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: Unable to bind to socket: %s", __PRETTY_FUNCTION__, safe_strerror(errno)); close(mp->fd); @@ -267,7 +267,7 @@ int pim_msdp_sock_connect(struct pim_msdp_peer *mp) /* source bind */ rc = sockunion_bind(mp->fd, &mp->su_local, 0, &mp->su_local); if (rc < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "pim_msdp_socket connect bind failure: %s", safe_strerror(errno)); close(mp->fd); diff --git a/pimd/pim_neighbor.c b/pimd/pim_neighbor.c index 11d847636..bff1e7ff1 100644 --- a/pimd/pim_neighbor.c +++ b/pimd/pim_neighbor.c @@ -801,7 +801,7 @@ void pim_neighbor_update(struct pim_neighbor *neigh, if (neigh->prefix_list == addr_list) { if (addr_list) { flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "%s: internal error: trying to replace same prefix list=%p", __PRETTY_FUNCTION__, (void *)addr_list); } diff --git a/pimd/pim_rp.c b/pimd/pim_rp.c index 031e527eb..07b5e32c9 100644 --- a/pimd/pim_rp.c +++ b/pimd/pim_rp.c @@ -113,7 +113,7 @@ void pim_rp_init(struct pim_instance *pim) rp_info = XCALLOC(MTYPE_PIM_RP, sizeof(*rp_info)); if (!str2prefix("224.0.0.0/4", &rp_info->group)) { - flog_err(LIB_ERR_DEVELOPMENT, + flog_err(EC_LIB_DEVELOPMENT, "Unable to convert 224.0.0.0/4 to prefix"); list_delete_and_null(&pim->rp_list); route_table_finish(pim->rp_table); @@ -236,7 +236,7 @@ static struct rp_info *pim_rp_find_match_group(struct pim_instance *pim, rn = route_node_match(pim->rp_table, group); if (!rn) { flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "%s: BUG We should have found default group information\n", __PRETTY_FUNCTION__); return best; @@ -625,7 +625,7 @@ int pim_rp_del(struct pim_instance *pim, const char *rp, if (rn) { if (rn->info != rp_info) flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "Expected rn->info to be equal to rp_info"); if (PIM_DEBUG_TRACE) { diff --git a/pimd/pim_sock.c b/pimd/pim_sock.c index 1f584a2f9..c4538a4ac 100644 --- a/pimd/pim_sock.c +++ b/pimd/pim_sock.c @@ -151,7 +151,7 @@ int pim_socket_mcast(int protocol, struct in_addr ifaddr, struct interface *ifp, } #else flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "%s %s: Missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()", __FILE__, __PRETTY_FUNCTION__); close(fd); @@ -289,7 +289,7 @@ int pim_socket_join(int fd, struct in_addr group, struct in_addr ifaddr, sprintf(ifaddr_str, "<ifaddr?>"); flog_err( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "Failure socket joining fd=%d group %s on interface address %s: errno=%d: %s", fd, group_str, ifaddr_str, errno, safe_strerror(errno)); return ret; diff --git a/pimd/pim_ssm.c b/pimd/pim_ssm.c index 8347878d3..d04d90ac8 100644 --- a/pimd/pim_ssm.c +++ b/pimd/pim_ssm.c @@ -73,7 +73,7 @@ static int pim_is_grp_standard_ssm(struct prefix *group) if (first) { if (!str2prefix(PIM_SSM_STANDARD_RANGE, &group_ssm)) - flog_err(LIB_ERR_DEVELOPMENT, + flog_err(EC_LIB_DEVELOPMENT, "%s: Failure to Read Group Address: %s", __PRETTY_FUNCTION__, PIM_SSM_STANDARD_RANGE); diff --git a/pimd/pim_ssmpingd.c b/pimd/pim_ssmpingd.c index be30d9c73..a5082608b 100644 --- a/pimd/pim_ssmpingd.c +++ b/pimd/pim_ssmpingd.c @@ -83,7 +83,7 @@ static int ssmpingd_socket(struct in_addr addr, int port, int mttl) fd = socket(AF_INET, SOCK_DGRAM, IPPROTO_UDP); if (fd < 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: could not create socket: errno=%d: %s", __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; @@ -127,7 +127,7 @@ static int ssmpingd_socket(struct in_addr addr, int port, int mttl) } #else flog_err( - LIB_ERR_DEVELOPMENT, + EC_LIB_DEVELOPMENT, "%s %s: missing IP_PKTINFO and IP_RECVDSTADDR: unable to get dst addr from recvmsg()", __FILE__, __PRETTY_FUNCTION__); close(fd); diff --git a/pimd/pim_time.c b/pimd/pim_time.c index 029e55116..23c85c2fa 100644 --- a/pimd/pim_time.c +++ b/pimd/pim_time.c @@ -35,7 +35,7 @@ static int gettime_monotonic(struct timeval *tv) result = gettimeofday(tv, 0); if (result) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "%s: gettimeofday() failure: errno=%d: %s", __PRETTY_FUNCTION__, errno, safe_strerror(errno)); } @@ -52,7 +52,7 @@ int64_t pim_time_monotonic_sec() struct timeval now_tv; if (gettime_monotonic(&now_tv)) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "%s: gettime_monotonic() failure: errno=%d: %s", __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; @@ -71,7 +71,7 @@ int64_t pim_time_monotonic_dsec() int64_t now_dsec; if (gettime_monotonic(&now_tv)) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "%s: gettime_monotonic() failure: errno=%d: %s", __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; @@ -89,7 +89,7 @@ int64_t pim_time_monotonic_usec(void) int64_t now_dsec; if (gettime_monotonic(&now_tv)) { - flog_err_sys(LIB_ERR_SYSTEM_CALL, + flog_err_sys(EC_LIB_SYSTEM_CALL, "%s: gettime_monotonic() failure: errno=%d: %s", __PRETTY_FUNCTION__, errno, safe_strerror(errno)); return -1; diff --git a/pimd/pim_zlookup.c b/pimd/pim_zlookup.c index baa07a8ec..5f0b82792 100644 --- a/pimd/pim_zlookup.c +++ b/pimd/pim_zlookup.c @@ -123,7 +123,7 @@ void zclient_lookup_new(void) { zlookup = zclient_new_notify(master, &zclient_options_default); if (!zlookup) { - flog_err(LIB_ERR_ZAPI_SOCKET, "%s: zclient_new() failure", + flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient_new() failure", __PRETTY_FUNCTION__); return; } @@ -170,7 +170,7 @@ static int zclient_read_nexthop(struct pim_instance *pim, err = zclient_read_header(s, zlookup->sock, &length, &marker, &version, &vrf_id, &command); if (err < 0) { - flog_err(LIB_ERR_ZAPI_MISSMATCH, + flog_err(EC_LIB_ZAPI_MISSMATCH, "%s: zclient_read_header() failed", __PRETTY_FUNCTION__); zclient_lookup_failed(zlookup); @@ -315,7 +315,7 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, /* Check socket. */ if (zlookup->sock < 0) { - flog_err(LIB_ERR_ZAPI_SOCKET, + flog_err(EC_LIB_ZAPI_SOCKET, "%s: zclient lookup socket is not connected", __PRETTY_FUNCTION__); zclient_lookup_failed(zlookup); @@ -338,14 +338,14 @@ static int zclient_lookup_nexthop_once(struct pim_instance *pim, ret = writen(zlookup->sock, s->data, stream_get_endp(s)); if (ret < 0) { flog_err( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "%s: writen() failure: %d writing to zclient lookup socket", __PRETTY_FUNCTION__, errno); zclient_lookup_failed(zlookup); return -2; } if (ret == 0) { - flog_err_sys(LIB_ERR_SOCKET, + flog_err_sys(EC_LIB_SOCKET, "%s: connection closed on zclient lookup socket", __PRETTY_FUNCTION__); zclient_lookup_failed(zlookup); @@ -516,7 +516,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) ret = writen(zlookup->sock, s->data, count); if (ret <= 0) { flog_err( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "%s: writen() failure: %d writing to zclient lookup socket", __PRETTY_FUNCTION__, errno); return -1; @@ -535,7 +535,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) err = zclient_read_header(s, zlookup->sock, &length, &marker, &version, &vrf_id, &command); if (err < 0) { - flog_err(LIB_ERR_ZAPI_MISSMATCH, + flog_err(EC_LIB_ZAPI_MISSMATCH, "%s: zclient_read_header() failed", __PRETTY_FUNCTION__); zclient_lookup_failed(zlookup); @@ -553,7 +553,7 @@ int pim_zlookup_sg_statistics(struct channel_oil *c_oil) more.src = c_oil->oil.mfcc_origin; more.grp = c_oil->oil.mfcc_mcastgrp; flog_err( - LIB_ERR_ZAPI_MISSMATCH, + EC_LIB_ZAPI_MISSMATCH, "%s: Received wrong %s(%s) information requested", __PRETTY_FUNCTION__, pim_str_sg_dump(&more), c_oil->pim->vrf->name); diff --git a/pimd/pimd.c b/pimd/pimd.c index dd0c7e3c2..5d3018b2f 100644 --- a/pimd/pimd.c +++ b/pimd/pimd.c @@ -86,7 +86,7 @@ void pim_init() { if (!inet_aton(PIM_ALL_PIM_ROUTERS, &qpim_all_pim_routers_addr)) { flog_err( - LIB_ERR_SOCKET, + EC_LIB_SOCKET, "%s %s: could not solve %s to group address: errno=%d: %s", __FILE__, __PRETTY_FUNCTION__, PIM_ALL_PIM_ROUTERS, errno, safe_strerror(errno)); |