https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226429

--- Comment #1 from Conrad Meyer <c...@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*. 
h_addr_list is a network byte order value -- so at this point, it should have
been converted to host order instead.

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
freebsd-bugs@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/freebsd-bugs
To unsubscribe, send any mail to "freebsd-bugs-unsubscr...@freebsd.org"

Reply via email to