RFR: 8299593: getprotobyname should not be used
Daniel Jeliński
djelinski at openjdk.org
Wed Jan 4 14:39:37 UTC 2023
Please review this patch that removes the remaining uses of non-reentrant `getprotobyname` function.
While the protocol number for TCP could theoretically be modified to something other than the default `IPPROTO_TCP`, that scenario would likely not work, and is not something that we are willing to support. [Existing code](https://github.com/openjdk/jdk/blob/2f3f3b618500b5f112fabca30d4c6780b2a8e723/src/java.base/unix/native/libnet/net_util_md.c#L355) in networking area is using `IPPROTO_TCP` for `TCP_NODELAY`, and no issues were reported.
Tier 1-3 tests still pass.
-------------
Commit messages:
- Copyright
- Remove getprotobyname
Changes: https://git.openjdk.org/jdk/pull/11842/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=11842&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8299593
Stats: 8 lines in 2 files changed: 0 ins; 4 del; 4 mod
Patch: https://git.openjdk.org/jdk/pull/11842.diff
Fetch: git fetch https://git.openjdk.org/jdk pull/11842/head:pull/11842
PR: https://git.openjdk.org/jdk/pull/11842
More information about the serviceability-dev
mailing list