SVNews r330665

NOTE: This service is experimental and subject to change! Use at your own risk!

2018-03-08 17:23:18 - r330665 by cem (cem)

Complete list of files affected by revision r330665:

(Note: At the moment, these links point to ViewVC on They are probably slow. Do not overuse.)

  History   Contents   Diff   MODIFY   /head/sbin/ipfw/tables.c  

Commit message:

ipfw(8): Fix endianness for Legacy and Ipv4 table hostname values

The lookup_host() helper subroutine emits a struct in_addr value in network
byte order via caller passed pointer. However, the table value is expected
to be stored in host byte order. On little-endian machines, this produced a
reversed endian table value for Legacy or IPv4 table types when the value
was a hostname (instead of a plain IP address).

Fix by using ntohl() on the output 32-bit address.

While here, avoid some aliasing violations by storing the lookup_host()
output in an intermediate object of the correct type.

PR: 226429
Reported by: AT (also: Tested by)
Security: ipfw hostname table rules could potentially not act as admin intended
Sponsored by: Dell EMC Isilon


Powered by Python FreeBSD support by secnetix GmbH & Co. KG

Page generated in 10 ms, 1 file printed. Current time is 2018-03-22 11:43:30. All times are in UTC/GMT.