summaryrefslogtreecommitdiff
path: root/zebra/if_netlink.c
diff options
context:
space:
mode:
Diffstat (limited to 'zebra/if_netlink.c')
-rw-r--r--zebra/if_netlink.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/zebra/if_netlink.c b/zebra/if_netlink.c
index f03252369f..a8cf5e31b6 100644
--- a/zebra/if_netlink.c
+++ b/zebra/if_netlink.c
@@ -992,10 +992,10 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup)
/* Register interface address to the interface. */
if (ifa->ifa_family == AF_INET) {
if (ifa->ifa_prefixlen > IPV4_MAX_BITLEN) {
- zlog_warn(
+ zlog_err(
"Invalid prefix length: %u received from kernel interface addr change: %u",
ifa->ifa_prefixlen, h->nlmsg_type);
- return 0;
+ return -1;
}
if (h->nlmsg_type == RTM_NEWADDR)
connected_add_ipv4(ifp, flags, (struct in_addr *)addr,
@@ -1008,10 +1008,10 @@ int netlink_interface_addr(struct nlmsghdr *h, ns_id_t ns_id, int startup)
}
if (ifa->ifa_family == AF_INET6) {
if (ifa->ifa_prefixlen > IPV6_MAX_BITLEN) {
- zlog_warn(
+ zlog_err(
"Invalid prefix length: %u received from kernel interface addr change: %u",
ifa->ifa_prefixlen, h->nlmsg_type);
- return 0;
+ return -1;
}
if (h->nlmsg_type == RTM_NEWADDR) {
/* Only consider valid addresses; we'll not get a