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
Unknown Object (File)
Tue, Jan 21, 2:17 PM
Unknown Object (File)
Mon, Jan 20, 9:14 AM
Unknown Object (File)
Mon, Jan 13, 9:47 PM
Unknown Object (File)
Sat, Jan 11, 8:01 PM
Unknown Object (File)
Fri, Jan 3, 6:18 PM
Unknown Object (File)
Dec 23 2024, 1:58 AM
Unknown Object (File)
Dec 22 2024, 8:26 PM
Unknown Object (File)
Nov 21 2024, 8:44 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.