From: florian Date: Mon, 8 Jul 2024 13:46:33 +0000 (+0000) Subject: IN_MULTICAST uses host byte order X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=1f327cd496aa9b34d83aff9c40ae414d53b3c813;p=openbsd IN_MULTICAST uses host byte order I somehow missed this when ripping out 3 layers of indirections. from niklas --- diff --git a/usr.bin/dig/lib/isc/sockaddr.c b/usr.bin/dig/lib/isc/sockaddr.c index 04dbd8e2c80..2b491bbedc0 100644 --- a/usr.bin/dig/lib/isc/sockaddr.c +++ b/usr.bin/dig/lib/isc/sockaddr.c @@ -14,7 +14,7 @@ * PERFORMANCE OF THIS SOFTWARE. */ -/* $Id: sockaddr.c,v 1.16 2022/01/17 18:19:51 naddy Exp $ */ +/* $Id: sockaddr.c,v 1.17 2024/07/08 13:46:33 florian Exp $ */ /*! \file */ #include @@ -248,7 +248,7 @@ isc_sockaddr_ismulticast(const struct sockaddr_storage *sockaddr) { switch (sockaddr->ss_family) { case AF_INET: sin = (struct sockaddr_in *)sockaddr; - return (IN_MULTICAST(sin->sin_addr.s_addr)); + return (IN_MULTICAST(ntohl(sin->sin_addr.s_addr))); case AF_INET6: sin6 = (struct sockaddr_in6 *)sockaddr; return (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr));