Page MenuHomeFreeBSD

Remove inet_ntoa(); use inet_ntoa_r() instead
ClosedPublic

Authored by vangyzen on Feb 15 2017, 10:19 PM.
Tags
None
Referenced Files
F105939358: D9625.diff
Sun, Dec 22, 8:26 PM
Unknown Object (File)
Nov 21 2024, 8:44 PM
Unknown Object (File)
Nov 21 2024, 8:43 PM
Unknown Object (File)
Nov 21 2024, 7:49 PM
Unknown Object (File)
Oct 5 2024, 4:20 AM
Unknown Object (File)
Oct 4 2024, 9:15 PM
Unknown Object (File)
Oct 4 2024, 11:28 AM
Unknown Object (File)
Oct 3 2024, 4:10 PM

Details

Summary

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.

Remove inet_ntoa() from head (no MFC).

Diff Detail

Repository
rS FreeBSD src repository - subversion
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

vangyzen retitled this revision from to Remove inet_ntoa(); use inet_ntoa_r() instead.
vangyzen updated this object.
vangyzen edited the test plan for this revision. (Show Details)
vangyzen added subscribers: network, glebius, emaste.
sys/netpfil/pf/pf_osfp.c
123 ↗(On Diff #25248)

Note: This INET6 conditional existed before my changes, but opt_inet6.h was not included, so INET6 was never defined. Apparently, pf's OS fingerprinting hasn't worked with IPv6 for a decade.

gnn added a reviewer: gnn.
This revision is now accepted and ready to land.Feb 15 2017, 11:49 PM
kp added a reviewer: kp.
kp added a subscriber: kp.

pf bits look good to me.

This revision was automatically updated to reflect the committed changes.