]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC r313820
authorvangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 10 Mar 2017 20:38:18 +0000 (20:38 +0000)
committervangyzen <vangyzen@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Fri, 10 Mar 2017 20:38:18 +0000 (20:38 +0000)
commit65480c6f7b2f917501ce61f92364fb4619372dc8
treefa1f2ab0eb6a4b29bd7424ada71bf113822612ce
parent383040c4362f6cb4104fadc1c54274899dec9b1d
MFC r313820

pf: use inet_ntoa_r() instead of inet_ntoa(); maybe fix IPv6 OS fingerprinting

inet_ntoa() cannot be used safely in a multithreaded environment
because it uses a static local buffer. Instead, use inet_ntoa_r()
with a buffer on the caller's stack.

This code had an INET6 conditional before this commit, but opt_inet6.h
was not included, so INET6 was never defined.  Apparently, pf's OS
fingerprinting hasn't worked with IPv6 for quite some time.
This commit might fix it, but I didn't test that.

Relnotes: yes (if I/someone can test pf OS fingerprinting with IPv6)
Sponsored by: Dell EMC

git-svn-id: svn://svn.freebsd.org/base/stable/10@315028 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
sys/netpfil/pf/pf_osfp.c