]> git.puffer.fish Git - matthieu/frr.git/commitdiff
zebra: fix another FreeBSD warning message
authorRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 8 Jan 2019 12:37:22 +0000 (10:37 -0200)
committerRafael Zalamena <rzalamena@opensourcerouting.org>
Tue, 8 Jan 2019 12:37:22 +0000 (10:37 -0200)
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 <rzalamena@opensourcerouting.org>
zebra/kernel_socket.c

index 29d2b1f45f92fc8b2e139d81f3479306f124a971..84b06e579f91c661a09aee2ab30560a8b8e53073 100644 (file)
@@ -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");
 }