Date: Thu, 08 Mar 2018 04:20:22 +0000 From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 226429] ipfw table add & hostname parsing Message-ID: <bug-226429-8-oHpzSwZ7pu@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-226429-8@https.bugs.freebsd.org/bugzilla/> References: <bug-226429-8@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D226429 --- Comment #1 from Conrad Meyer <cem@freebsd.org> --- Clearly the endianness of the address is being reversed somewhere. In ipfw/tables.c, the v->nh4 value is assumed to be host endian. It is then converted to net endian and formatted. However, tentry_fill_value()'s DNS resolution code is just broken for ipv4 values. It bogusly casts the (uint32 *) &v->nh4 to (struct in_addr *) and passes it off to lookup_host(). lookup_host() uses gethostbyname()->h_addr_list[0] to assign to the passed in struct in_addr*.= =20 h_addr_list is a network byte order value -- so at this point, it should ha= ve been converted to host order instead. --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-226429-8-oHpzSwZ7pu>