Skip to content

Commit

Permalink
babeld: We do not need to put Warning into our warning messages
Browse files Browse the repository at this point in the history
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
  • Loading branch information
donaldsharp authored and eqvinox committed Mar 14, 2021
1 parent 6dd43a3 commit 5c997d2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 15 deletions.
3 changes: 1 addition & 2 deletions babeld/babeld.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ babel_get_myid(void)
return;
}

flog_err(EC_BABEL_CONFIG,
"Warning: couldn't find router id -- using random value.");
flog_err(EC_BABEL_CONFIG, "Couldn't find router id -- using random value.");

rc = read_random_bytes(myid, 8);
if(rc < 0) {
Expand Down
15 changes: 7 additions & 8 deletions babeld/message.c
Original file line number Diff line number Diff line change
Expand Up @@ -746,10 +746,9 @@ flushbuf(struct interface *ifp)
if(rc < 0)
flog_err(EC_BABEL_PACKET, "send: %s", safe_strerror(errno));
} else {
flog_err(EC_BABEL_PACKET,
"Warning: bucket full, dropping packet to %s.",
ifp->name);
}
flog_err(EC_BABEL_PACKET, "Bucket full, dropping packet to %s.",
ifp->name);
}
}
VALGRIND_MAKE_MEM_UNDEFINED(babel_ifp->sendbuf, babel_ifp->bufsize);
babel_ifp->buffered = 0;
Expand Down Expand Up @@ -1009,10 +1008,10 @@ flush_unicast(int dofree)
flog_err(EC_BABEL_PACKET, "send(unicast): %s",
safe_strerror(errno));
} else {
flog_err(EC_BABEL_PACKET,
"Warning: bucket full, dropping unicast packet to %s if %s.",
format_address(unicast_neighbour->address),
unicast_neighbour->ifp->name);
flog_err(EC_BABEL_PACKET,
"Bucket full, dropping unicast packet to %s if %s.",
format_address(unicast_neighbour->address),
unicast_neighbour->ifp->name);
}

done:
Expand Down
13 changes: 8 additions & 5 deletions babeld/route.c
Original file line number Diff line number Diff line change
Expand Up @@ -399,15 +399,17 @@ install_route(struct babel_route *route)
return;

if(!route_feasible(route))
flog_err(EC_BABEL_ROUTE, "WARNING: installing unfeasible route (this shouldn't happen).");
flog_err(EC_BABEL_ROUTE,
"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) {
flog_err(EC_BABEL_ROUTE,
"WARNING: attempting to install duplicate route (this shouldn't happen).");
return;
flog_err(
EC_BABEL_ROUTE,
"Attempting to install duplicate route (this shouldn't happen).");
return;
}

rc = kernel_route(ROUTE_ADD, route->src->prefix, route->src->plen,
Expand Down Expand Up @@ -463,7 +465,8 @@ switch_routes(struct babel_route *old, struct babel_route *new)
return;

if(!route_feasible(new))
flog_err(EC_BABEL_ROUTE, "WARNING: switching to unfeasible route (this shouldn't happen).");
flog_err(EC_BABEL_ROUTE,
"Switching to unfeasible route (this shouldn't happen).");

rc = kernel_route(ROUTE_MODIFY, old->src->prefix, old->src->plen,
old->nexthop, old->neigh->ifp->ifindex,
Expand Down

0 comments on commit 5c997d2

Please sign in to comment.