Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 08 Mar 2018 17:23:51 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-ipfw@FreeBSD.org
Subject:   [Bug 226429] ipfw table add & hostname parsing
Message-ID:  <bug-226429-7515-IY1PM8vMuI@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-226429-7515@https.bugs.freebsd.org/bugzilla/>
References:  <bug-226429-7515@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 #5 from commit-hook@freebsd.org ---
A commit references this bug:

Author: cem
Date: Thu Mar  8 17:23:19 UTC 2018
New revision: 330665
URL: https://svnweb.freebsd.org/changeset/base/330665

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

  The lookup_host() helper subroutine emits a struct in_addr value in netwo=
rk
  byte order via caller passed pointer.  However, the table value is expect=
ed
  to be stored in host byte order.  On little-endian machines, this produce=
d 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:  bugs.freebsd.org AT mx.zzux.com (also: Tested by)
  Security:     ipfw hostname table rules could potentially not act as admin
intended
  Sponsored by: Dell EMC Isilon

Changes:
  head/sbin/ipfw/tables.c

--=20
You are receiving this mail because:
You are the assignee for the bug.=



Want to link to this message? Use this URL: <http://docs.FreeBSD.org/cgi/mid.cgi?bug-226429-7515-IY1PM8vMuI>