RFR: 8299593: getprotobyname should not be used

Chris Plummer cjplummer at openjdk.org
Fri Jan 6 22:15:51 UTC 2023


On Wed, 4 Jan 2023 12:56:18 GMT, Daniel Jeliński <djelinski at openjdk.org> wrote:

> 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.

Looks good.

-------------

Marked as reviewed by cjplummer (Reviewer).

PR: https://git.openjdk.org/jdk/pull/11842


More information about the serviceability-dev mailing list