From 68c637b1581e93f77e5546f781bbdd7fe796d3ba Mon Sep 17 00:00:00 2001 From: Rafael Zalamena Date: Tue, 8 Jan 2019 10:37:22 -0200 Subject: [PATCH] zebra: fix another FreeBSD warning message When an empty netmask a wrong end size is calculated, lets handle this corner case to avoid spurious warning messages. Signed-off-by: Rafael Zalamena (cherry picked from commit 2d100aa5f12d1b5e09411fd27d0e3938cf4305db) --- zebra/kernel_socket.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 29d2b1f45f..84b06e579f 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -769,7 +769,7 @@ static void ifam_read_mesg(struct ifa_msghdr *ifm, union sockunion *addr, /* Assert read up end point matches to end point */ pnt = (caddr_t)ROUNDUP((size_t)pnt); - if (pnt != end) + if (pnt != (caddr_t)ROUNDUP((size_t)end)) zlog_debug("ifam_read() doesn't read all socket data"); } -- 2.39.5