]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
ipfw(8): Handle unaligned pointers in pr_u64.
authormarkj <markj@FreeBSD.org>
Mon, 13 Jul 2020 19:10:16 +0000 (19:10 +0000)
committermarkj <markj@FreeBSD.org>
Mon, 13 Jul 2020 19:10:16 +0000 (19:10 +0000)
commitd766bb0d2894d24e8c7dfdad8e3c19c46a55208f
tree5e02ecb4d2382c8c19366da400b49b36a95fc74b
parenta1ab0ca53239d72cfa778c5e333445e33fadc18d
ipfw(8): Handle unaligned pointers in pr_u64.

struct _ipfw_dyn_rule is defined as packed, and as a result, its
uint64_t fields are misaligned on some 32-bit platforms.  Since
pr_u64() is explicitly supposed to handle this case, avoid using a
uint64_t * for the input pointer to make sure that the compiler won't
(correctly) warn about the misalignment.

Reported by: jenkins
MFC with: r363164
sbin/ipfw/ipfw2.c
sbin/ipfw/ipfw2.h