summaryrefslogtreecommitdiff
path: root/zebra/interface.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/interface.c')
-rw-r--r--zebra/interface.c19
1 files changed, 12 insertions, 7 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 32ee1a566a..eabf0638a7 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -49,6 +49,7 @@
#include "zebra/rt_netlink.h"
#include "zebra/interface.h"
#include "zebra/zebra_vxlan.h"
+#include "zebra/zebra_errors.h"
#define ZEBRA_PTM_SUPPORT
@@ -336,9 +337,9 @@ 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)) {
- zlog_warn(
- "Trying to remove an address from an unknown subnet."
- " (please report this bug)");
+ flog_warn(ZEBRA_ERR_REMOVE_ADDR_UNKNOWN_SUBNET,
+ "Trying to remove an address from an unknown subnet."
+ " (please report this bug)");
return -1;
}
route_unlock_node(rn);
@@ -350,7 +351,8 @@ int if_subnet_delete(struct interface *ifp, struct connected *ifc)
* In any case, we shouldn't decrement the lock counter if the address
* is unknown. */
if (!listnode_lookup(addr_list, ifc)) {
- zlog_warn(
+ flog_warn(
+ ZEBRA_ERR_REMOVE_UNREGISTERED_ADDR,
"Trying to remove an address from a subnet where it is not"
" currently registered. (please report this bug)");
return -1;
@@ -496,7 +498,8 @@ static void if_addr_wakeup(struct interface *ifp)
ret = if_set_prefix(ifp, ifc);
if (ret < 0) {
- zlog_warn(
+ flog_err_sys(
+ ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
"Can't set interface's address: %s",
safe_strerror(errno));
continue;
@@ -518,7 +521,8 @@ static void if_addr_wakeup(struct interface *ifp)
ret = if_prefix_add_ipv6(ifp, ifc);
if (ret < 0) {
- zlog_warn(
+ flog_err_sys(
+ ZEBRA_ERR_IFACE_ADDR_ADD_FAILED,
"Can't set interface's address: %s",
safe_strerror(errno));
continue;
@@ -908,7 +912,8 @@ void if_up(struct interface *ifp)
/* Notify the protocol daemons. */
if (ifp->ptm_enable && (ifp->ptm_status == ZEBRA_PTM_STATUS_DOWN)) {
- zlog_warn("%s: interface %s hasn't passed ptm check\n",
+ flog_warn(ZEBRA_ERR_PTM_NOT_READY,
+ "%s: interface %s hasn't passed ptm check\n",
__func__, ifp->name);
return;
}