summaryrefslogtreecommitdiffstats
path: root/babeld
diff options
context:
space:
mode:
authorQuentin Young <qlyoung@cumulusnetworks.com>2018-08-03 20:03:29 +0200
committerQuentin Young <qlyoung@cumulusnetworks.com>2018-08-14 22:02:05 +0200
commitaf4c27286d8eb3f347ff431a17a47a8d07cd8976 (patch)
treecaf5eae55c21f72baec4945cdb2cbc333d99f916 /babeld
parentlib: remove still reachable blocks in ferr.c (diff)
downloadfrr-af4c27286d8eb3f347ff431a17a47a8d07cd8976.tar.xz
frr-af4c27286d8eb3f347ff431a17a47a8d07cd8976.zip
*: rename zlog_fer -> flog_err
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'babeld')
-rw-r--r--babeld/babel_interface.c24
-rw-r--r--babeld/babel_main.c24
-rw-r--r--babeld/babeld.c12
-rw-r--r--babeld/message.c52
-rw-r--r--babeld/neighbour.c2
-rw-r--r--babeld/route.c18
-rw-r--r--babeld/source.c2
7 files changed, 67 insertions, 67 deletions
diff --git a/babeld/babel_interface.c b/babeld/babel_interface.c
index dc47ff002..f17d83905 100644
--- a/babeld/babel_interface.c
+++ b/babeld/babel_interface.c
@@ -169,7 +169,7 @@ babel_interface_address_add (int cmd, struct zclient *client,
if (babel_ifp->ipv4 == NULL) {
babel_ifp->ipv4 = malloc(4);
if (babel_ifp->ipv4 == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "not enough memory");
+ flog_err(BABEL_ERR_MEMORY, "not enough memory");
} else {
memcpy(babel_ifp->ipv4, &prefix->u.prefix4, 4);
}
@@ -709,7 +709,7 @@ interface_recalculate(struct interface *ifp)
tmp = babel_ifp->sendbuf;
babel_ifp->sendbuf = realloc(babel_ifp->sendbuf, babel_ifp->bufsize);
if(babel_ifp->sendbuf == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't reallocate sendbuf.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't reallocate sendbuf.");
free(tmp);
babel_ifp->bufsize = 0;
return -1;
@@ -729,7 +729,7 @@ interface_recalculate(struct interface *ifp)
rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_JOIN_GROUP,
(char*)&mreq, sizeof(mreq));
if(rc < 0) {
- zlog_ferr(LIB_ERR_SOCKET,
+ flog_err(LIB_ERR_SOCKET,
"setsockopt(IPV6_JOIN_GROUP) on interface '%s': %s",
ifp->name, safe_strerror(errno));
/* This is probably due to a missing link-local address,
@@ -793,7 +793,7 @@ interface_reset(struct interface *ifp)
rc = setsockopt(protocol_socket, IPPROTO_IPV6, IPV6_LEAVE_GROUP,
(char*)&mreq, sizeof(mreq));
if(rc < 0)
- zlog_ferr(LIB_ERR_SOCKET,
+ flog_err(LIB_ERR_SOCKET,
"setsockopt(IPV6_LEAVE_GROUP) on interface '%s': %s",
ifp->name, safe_strerror(errno));
}
@@ -1060,7 +1060,7 @@ DEFUN (show_babel_route,
}
route_stream_done(routes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
xroutes = xroute_stream();
if(xroutes) {
@@ -1072,7 +1072,7 @@ DEFUN (show_babel_route,
}
xroute_stream_done(xroutes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
return CMD_SUCCESS;
}
@@ -1107,7 +1107,7 @@ DEFUN (show_babel_route_prefix,
}
route_stream_done(routes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
xroutes = xroute_stream();
if(xroutes) {
@@ -1119,7 +1119,7 @@ DEFUN (show_babel_route_prefix,
}
xroute_stream_done(xroutes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
return CMD_SUCCESS;
}
@@ -1165,7 +1165,7 @@ DEFUN (show_babel_route_addr,
}
route_stream_done(routes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
xroutes = xroute_stream();
if(xroutes) {
@@ -1177,7 +1177,7 @@ DEFUN (show_babel_route_addr,
}
xroute_stream_done(xroutes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
return CMD_SUCCESS;
}
@@ -1224,7 +1224,7 @@ DEFUN (show_babel_route_addr6,
}
route_stream_done(routes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
xroutes = xroute_stream();
if(xroutes) {
@@ -1236,7 +1236,7 @@ DEFUN (show_babel_route_addr6,
}
xroute_stream_done(xroutes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
return CMD_SUCCESS;
}
diff --git a/babeld/babel_main.c b/babeld/babel_main.c
index 554244a28..89617c0dc 100644
--- a/babeld/babel_main.c
+++ b/babeld/babel_main.c
@@ -225,7 +225,7 @@ babel_init_random(void)
rc = read_random_bytes(&seed, sizeof(seed));
if(rc < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "read(random): %s",
+ flog_err(LIB_ERR_SYSTEM_CALL, "read(random): %s",
safe_strerror(errno));
seed = 42;
}
@@ -246,13 +246,13 @@ babel_replace_by_null(int fd)
fd_null = open("/dev/null", O_RDONLY);
if(fd_null < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "open(null): %s", safe_strerror(errno));
+ flog_err(LIB_ERR_SYSTEM_CALL, "open(null): %s", safe_strerror(errno));
exit(1);
}
rc = dup2(fd_null, fd);
if(rc < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "dup2(null, 0): %s",
+ flog_err(LIB_ERR_SYSTEM_CALL, "dup2(null, 0): %s",
safe_strerror(errno));
exit(1);
}
@@ -272,11 +272,11 @@ babel_load_state_file(void)
fd = open(state_file, O_RDONLY);
if(fd < 0 && errno != ENOENT)
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "open(babel-state: %s)",
+ flog_err(LIB_ERR_SYSTEM_CALL, "open(babel-state: %s)",
safe_strerror(errno));
rc = unlink(state_file);
if(fd >= 0 && rc < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "unlink(babel-state): %s",
+ flog_err(LIB_ERR_SYSTEM_CALL, "unlink(babel-state): %s",
safe_strerror(errno));
/* If we couldn't unlink it, it's probably stale. */
goto fini;
@@ -288,7 +288,7 @@ babel_load_state_file(void)
long t;
rc = read(fd, buf, 99);
if(rc < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "read(babel-state): %s",
+ flog_err(LIB_ERR_SYSTEM_CALL, "read(babel-state): %s",
safe_strerror(errno));
} else {
buf[rc] = '\0';
@@ -297,7 +297,7 @@ babel_load_state_file(void)
unsigned char sid[8];
rc = parse_eui64(buf2, sid);
if(rc < 0) {
- zlog_ferr(BABEL_ERR_CONFIG, "Couldn't parse babel-state.");
+ flog_err(BABEL_ERR_CONFIG, "Couldn't parse babel-state.");
} else {
struct timeval realnow;
debugf(BABEL_DEBUG_COMMON,
@@ -307,13 +307,13 @@ babel_load_state_file(void)
if(memcmp(sid, myid, 8) == 0)
myseqno = seqno_plus(s, 1);
else
- zlog_ferr(BABEL_ERR_CONFIG,
+ flog_err(BABEL_ERR_CONFIG,
"ID mismatch in babel-state. id=%s; old=%s",
format_eui64(myid),
format_eui64(sid));
}
} else {
- zlog_ferr(BABEL_ERR_CONFIG, "Couldn't parse babel-state.");
+ flog_err(BABEL_ERR_CONFIG, "Couldn't parse babel-state.");
}
}
goto fini;
@@ -353,7 +353,7 @@ babel_save_state_file(void)
debugf(BABEL_DEBUG_COMMON, "Save state file.");
fd = open(state_file, O_WRONLY | O_TRUNC | O_CREAT, 0644);
if(fd < 0) {
- zlog_ferr(LIB_ERR_SYSTEM_CALL, "creat(babel-state): %s",
+ flog_err(LIB_ERR_SYSTEM_CALL, "creat(babel-state): %s",
safe_strerror(errno));
unlink(state_file);
} else {
@@ -364,12 +364,12 @@ babel_save_state_file(void)
format_eui64(myid), (int)myseqno,
(long)realnow.tv_sec);
if(rc < 0 || rc >= 100) {
- zlog_ferr(BABEL_ERR_CONFIG, "write(babel-state): overflow.");
+ flog_err(BABEL_ERR_CONFIG, "write(babel-state): overflow.");
unlink(state_file);
} else {
rc = write(fd, buf, rc);
if(rc < 0) {
- zlog_ferr(BABEL_ERR_CONFIG, "write(babel-state): %s",
+ flog_err(BABEL_ERR_CONFIG, "write(babel-state): %s",
safe_strerror(errno));
unlink(state_file);
}
diff --git a/babeld/babeld.c b/babeld/babeld.c
index dd0767142..b05f26919 100644
--- a/babeld/babeld.c
+++ b/babeld/babeld.c
@@ -145,7 +145,7 @@ babel_create_routing_process (void)
/* Make socket for Babel protocol. */
protocol_socket = babel_socket(protocol_port);
if (protocol_socket < 0) {
- zlog_ferr(LIB_ERR_SOCKET, "Couldn't create link local socket: %s",
+ flog_err(LIB_ERR_SOCKET, "Couldn't create link local socket: %s",
safe_strerror(errno));
goto fail;
}
@@ -179,7 +179,7 @@ babel_read_protocol (struct thread *thread)
(struct sockaddr*)&sin6, sizeof(sin6));
if(rc < 0) {
if(errno != EAGAIN && errno != EINTR) {
- zlog_ferr(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno));
+ flog_err(LIB_ERR_SOCKET, "recv: %s", safe_strerror(errno));
}
} else {
FOR_ALL_INTERFACES(vrf, ifp) {
@@ -255,12 +255,12 @@ babel_get_myid(void)
return;
}
- zlog_ferr(BABEL_ERR_CONFIG,
+ flog_err(BABEL_ERR_CONFIG,
"Warning: couldn't find router id -- using random value.");
rc = read_random_bytes(myid, 8);
if(rc < 0) {
- zlog_ferr(BABEL_ERR_CONFIG, "read(random): %s (cannot assign an ID)",
+ flog_err(BABEL_ERR_CONFIG, "read(random): %s (cannot assign an ID)",
safe_strerror(errno));
exit(1);
}
@@ -519,7 +519,7 @@ resize_receive_buffer(int size)
if(receive_buffer == NULL) {
receive_buffer = malloc(size);
if(receive_buffer == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "malloc(receive_buffer): %s",
+ flog_err(BABEL_ERR_MEMORY, "malloc(receive_buffer): %s",
safe_strerror(errno));
return -1;
}
@@ -528,7 +528,7 @@ resize_receive_buffer(int size)
unsigned char *new;
new = realloc(receive_buffer, size);
if(new == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "realloc(receive_buffer): %s",
+ flog_err(BABEL_ERR_MEMORY, "realloc(receive_buffer): %s",
safe_strerror(errno));
return -1;
}
diff --git a/babeld/message.c b/babeld/message.c
index c6b72f827..09eaca7a4 100644
--- a/babeld/message.c
+++ b/babeld/message.c
@@ -141,12 +141,12 @@ parse_update_subtlv(const unsigned char *a, int alen,
}
if(i + 1 > alen) {
- zlog_ferr(BABEL_ERR_PACKET, "Received truncated attributes.");
+ flog_err(BABEL_ERR_PACKET, "Received truncated attributes.");
return;
}
len = a[i + 1];
if(i + len > alen) {
- zlog_ferr(BABEL_ERR_PACKET, "Received truncated attributes.");
+ flog_err(BABEL_ERR_PACKET, "Received truncated attributes.");
return;
}
@@ -154,14 +154,14 @@ parse_update_subtlv(const unsigned char *a, int alen,
/* Nothing. */
} else if(type == SUBTLV_DIVERSITY) {
if(len > DIVERSITY_HOPS) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received overlong channel information (%d > %d).n",
len, DIVERSITY_HOPS);
len = DIVERSITY_HOPS;
}
if(memchr(a + i + 2, 0, len) != NULL) {
/* 0 is reserved. */
- zlog_ferr(BABEL_ERR_PACKET, "Channel information contains 0!");
+ flog_err(BABEL_ERR_PACKET, "Channel information contains 0!");
return;
}
memset(channels, 0, DIVERSITY_HOPS);
@@ -189,13 +189,13 @@ parse_hello_subtlv(const unsigned char *a, int alen,
}
if(i + 1 > alen) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received truncated sub-TLV on Hello message.");
return -1;
}
len = a[i + 1];
if(i + len > alen) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received truncated sub-TLV on Hello message.");
return -1;
}
@@ -207,7 +207,7 @@ parse_hello_subtlv(const unsigned char *a, int alen,
DO_NTOHL(*hello_send_us, a + i + 2);
ret = 1;
} else {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received incorrect RTT sub-TLV on Hello message.");
}
} else {
@@ -235,13 +235,13 @@ parse_ihu_subtlv(const unsigned char *a, int alen,
}
if(i + 1 > alen) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received truncated sub-TLV on IHU message.");
return -1;
}
len = a[i + 1];
if(i + len > alen) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received truncated sub-TLV on IHU message.");
return -1;
}
@@ -255,7 +255,7 @@ parse_ihu_subtlv(const unsigned char *a, int alen,
ret = 1;
}
else {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received incorrect RTT sub-TLV on IHU message.");
}
} else {
@@ -345,14 +345,14 @@ parse_packet(const unsigned char *from, struct interface *ifp,
}
if(!linklocal(from)) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received packet from non-local address %s.",
format_address(from));
return;
}
if (babel_packet_examin (packet, packetlen)) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received malformed packet on %s from %s.",
ifp->name, format_address(from));
return;
@@ -360,14 +360,14 @@ parse_packet(const unsigned char *from, struct interface *ifp,
neigh = find_neighbour(from, ifp);
if(neigh == NULL) {
- zlog_ferr(BABEL_ERR_PACKET, "Couldn't allocate neighbour.");
+ flog_err(BABEL_ERR_PACKET, "Couldn't allocate neighbour.");
return;
}
DO_NTOHS(bodylen, packet + 2);
if(bodylen + 4 > packetlen) {
- zlog_ferr(BABEL_ERR_PACKET, "Received truncated packet (%d + 4 > %d).",
+ flog_err(BABEL_ERR_PACKET, "Received truncated packet (%d + 4 > %d).",
bodylen, packetlen);
bodylen = packetlen - 4;
}
@@ -516,7 +516,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
have_router_id = 1;
}
if(!have_router_id && message[2] != 0) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received prefix with no router id.");
goto fail;
}
@@ -528,7 +528,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
if(message[2] == 0) {
if(metric < 0xFFFF) {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Received wildcard update with finite metric.");
goto done;
}
@@ -621,7 +621,7 @@ parse_packet(const unsigned char *from, struct interface *ifp,
continue;
fail:
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Couldn't parse packet (%d, %d) from %s on %s.",
message[0], message[1], format_address(from), ifp->name);
goto done;
@@ -710,7 +710,7 @@ fill_rtt_message(struct interface *ifp)
DO_HTONL(babel_ifp->sendbuf + babel_ifp->buffered_hello + 10, time);
return 1;
} else {
- zlog_ferr(BABEL_ERR_PACKET, "No space left for timestamp sub-TLV "
+ flog_err(BABEL_ERR_PACKET, "No space left for timestamp sub-TLV "
"(this shouldn't happen)");
return -1;
}
@@ -745,9 +745,9 @@ flushbuf(struct interface *ifp)
babel_ifp->sendbuf, babel_ifp->buffered,
(struct sockaddr*)&sin6, sizeof(sin6));
if(rc < 0)
- zlog_ferr(BABEL_ERR_PACKET, "send: %s", safe_strerror(errno));
+ flog_err(BABEL_ERR_PACKET, "send: %s", safe_strerror(errno));
} else {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Warning: bucket full, dropping packet to %s.",
ifp->name);
}
@@ -870,7 +870,7 @@ start_unicast_message(struct neighbour *neigh, int type, int len)
if(!unicast_buffer)
unicast_buffer = malloc(UNICAST_BUFSIZE);
if(!unicast_buffer) {
- zlog_ferr(BABEL_ERR_MEMORY, "malloc(unicast_buffer): %s",
+ flog_err(BABEL_ERR_MEMORY, "malloc(unicast_buffer): %s",
safe_strerror(errno));
return -1;
}
@@ -1007,10 +1007,10 @@ flush_unicast(int dofree)
unicast_buffer, unicast_buffered,
(struct sockaddr*)&sin6, sizeof(sin6));
if(rc < 0)
- zlog_ferr(BABEL_ERR_PACKET, "send(unicast): %s",
+ flog_err(BABEL_ERR_PACKET, "send(unicast): %s",
safe_strerror(errno));
} else {
- zlog_ferr(BABEL_ERR_PACKET,
+ flog_err(BABEL_ERR_PACKET,
"Warning: bucket full, dropping unicast packet to %s if %s.",
format_address(unicast_neighbour->address),
unicast_neighbour->ifp->name);
@@ -1318,7 +1318,7 @@ buffer_update(struct interface *ifp,
again:
babel_ifp->buffered_updates = malloc(n *sizeof(struct buffered_update));
if(babel_ifp->buffered_updates == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "malloc(buffered_updates): %s",
+ flog_err(BABEL_ERR_MEMORY, "malloc(buffered_updates): %s",
safe_strerror(errno));
if(n > 4) {
/* Try again with a tiny buffer. */
@@ -1382,7 +1382,7 @@ send_update(struct interface *ifp, int urgent,
}
route_stream_done(routes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate route stream.");
}
set_timeout(&babel_ifp->update_timeout, babel_ifp->update_interval);
babel_ifp->last_update_time = babel_now.tv_sec;
@@ -1460,7 +1460,7 @@ send_self_update(struct interface *ifp)
}
xroute_stream_done(xroutes);
} else {
- zlog_ferr(BABEL_ERR_MEMORY, "Couldn't allocate xroute stream.");
+ flog_err(BABEL_ERR_MEMORY, "Couldn't allocate xroute stream.");
}
}
diff --git a/babeld/neighbour.c b/babeld/neighbour.c
index d10ec15a8..c1592fb18 100644
--- a/babeld/neighbour.c
+++ b/babeld/neighbour.c
@@ -90,7 +90,7 @@ find_neighbour(const unsigned char *address, struct interface *ifp)
neigh = malloc(sizeof(struct neighbour));
if(neigh == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "malloc(neighbour): %s",
+ flog_err(BABEL_ERR_MEMORY, "malloc(neighbour): %s",
safe_strerror(errno));
return NULL;
}
diff --git a/babeld/route.c b/babeld/route.c
index da2523469..ceeaa1057 100644
--- a/babeld/route.c
+++ b/babeld/route.c
@@ -399,14 +399,14 @@ install_route(struct babel_route *route)
return;
if(!route_feasible(route))
- zlog_ferr(BABEL_ERR_ROUTE, "WARNING: installing unfeasible route "
+ flog_err(BABEL_ERR_ROUTE, "WARNING: installing unfeasible route "
"(this shouldn't happen).");
i = find_route_slot(route->src->prefix, route->src->plen, NULL);
assert(i >= 0 && i < route_slots);
if(routes[i] != route && routes[i]->installed) {
- zlog_ferr(BABEL_ERR_ROUTE,
+ flog_err(BABEL_ERR_ROUTE,
"WARNING: attempting to install duplicate route "
"(this shouldn't happen).");
return;
@@ -418,7 +418,7 @@ install_route(struct babel_route *route)
metric_to_kernel(route_metric(route)), NULL, 0, 0);
if(rc < 0) {
int save = errno;
- zlog_ferr(BABEL_ERR_ROUTE, "kernel_route(ADD): %s",
+ flog_err(BABEL_ERR_ROUTE, "kernel_route(ADD): %s",
safe_strerror(errno));
if(save != EEXIST)
return;
@@ -441,7 +441,7 @@ uninstall_route(struct babel_route *route)
route->neigh->ifp->ifindex,
metric_to_kernel(route_metric(route)), NULL, 0, 0);
if(rc < 0)
- zlog_ferr(BABEL_ERR_ROUTE, "kernel_route(FLUSH): %s",
+ flog_err(BABEL_ERR_ROUTE, "kernel_route(FLUSH): %s",
safe_strerror(errno));
route->installed = 0;
@@ -465,7 +465,7 @@ switch_routes(struct babel_route *old, struct babel_route *new)
return;
if(!route_feasible(new))
- zlog_ferr(BABEL_ERR_ROUTE, "WARNING: switching to unfeasible route "
+ flog_err(BABEL_ERR_ROUTE, "WARNING: switching to unfeasible route "
"(this shouldn't happen).");
rc = kernel_route(ROUTE_MODIFY, old->src->prefix, old->src->plen,
@@ -474,7 +474,7 @@ switch_routes(struct babel_route *old, struct babel_route *new)
new->nexthop, new->neigh->ifp->ifindex,
metric_to_kernel(route_metric(new)));
if(rc < 0) {
- zlog_ferr(BABEL_ERR_ROUTE, "kernel_route(MODIFY): %s",
+ flog_err(BABEL_ERR_ROUTE, "kernel_route(MODIFY): %s",
safe_strerror(errno));
return;
}
@@ -503,7 +503,7 @@ change_route_metric(struct babel_route *route,
route->nexthop, route->neigh->ifp->ifindex,
new);
if(rc < 0) {
- zlog_ferr(BABEL_ERR_ROUTE, "kernel_route(MODIFY metric): %s",
+ flog_err(BABEL_ERR_ROUTE, "kernel_route(MODIFY metric): %s",
safe_strerror(errno));
return;
}
@@ -798,7 +798,7 @@ update_route(const unsigned char *router_id,
return NULL;
if(martian_prefix(prefix, plen)) {
- zlog_ferr(BABEL_ERR_ROUTE, "Rejecting martian route to %s through %s.",
+ flog_err(BABEL_ERR_ROUTE, "Rejecting martian route to %s through %s.",
format_prefix(prefix, plen), format_address(nexthop));
return NULL;
}
@@ -906,7 +906,7 @@ update_route(const unsigned char *router_id,
route->next = NULL;
new_route = insert_route(route);
if(new_route == NULL) {
- zlog_ferr(BABEL_ERR_ROUTE, "Couldn't insert route.");
+ flog_err(BABEL_ERR_ROUTE, "Couldn't insert route.");
free(route);
return NULL;
}
diff --git a/babeld/source.c b/babeld/source.c
index 6145743a4..d6dd84895 100644
--- a/babeld/source.c
+++ b/babeld/source.c
@@ -59,7 +59,7 @@ find_source(const unsigned char *id, const unsigned char *p, unsigned char plen,
src = malloc(sizeof(struct source));
if(src == NULL) {
- zlog_ferr(BABEL_ERR_MEMORY, "malloc(source): %s", safe_strerror(errno));
+ flog_err(BABEL_ERR_MEMORY, "malloc(source): %s", safe_strerror(errno));
return NULL;
}