<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0cm;
font-size:11.0pt;
font-family:"Calibri",sans-serif;
mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
span.EmailStyle19
{mso-style-type:personal-reply;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-size:10.0pt;}
@page WordSection1
{size:612.0pt 792.0pt;
margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="en-DE" link="#0563C1" vlink="purple" style="word-wrap:break-word">
<div class="WordSection1">
<p class="MsoNormal"><span lang="EN-US">Hi Alan, thanks for the comment.<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">I created <a href="https://bugs.openjdk.org/browse/JDK-8320168">
https://bugs.openjdk.org/browse/JDK-8320168</a> .<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US"><o:p> </o:p></span></p>
<p class="MsoNormal"><span lang="EN-US">Best regards, Matthias<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="en-DE"><o:p> </o:p></span></p>
<div>
<div style="border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm">
<p class="MsoNormal"><b><span lang="EN-US" style="mso-fareast-language:#2000">From:</span></b><span lang="EN-US" style="mso-fareast-language:#2000"> Alan Bateman <Alan.Bateman@oracle.com>
<br>
<b>Sent:</b> Tuesday, 14 November 2023 20:02<br>
<b>To:</b> Baesken, Matthias <matthias.baesken@sap.com>; nio-dev@openjdk.org; net-dev@openjdk.org<br>
<b>Cc:</b> Zeller, Arno <arno.zeller@sap.com>; Langer, Christoph <christoph.langer@sap.com><br>
<b>Subject:</b> Re: return-value check of setsockopt ?<o:p></o:p></span></p>
</div>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">On 14/11/2023 15:16, Baesken, Matthias wrote:<br>
<br>
<span style="mso-fareast-language:#2000"><o:p></o:p></span></p>
<blockquote style="margin-top:5.0pt;margin-bottom:5.0pt">
<p class="MsoNormal"><span lang="EN-US">Hi, while looking at some net/nio coding, I noticed that at a lot of places the return value of setsockopt is checked :</span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"><a href="https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22setsockopt%22&type=code">https://github.com/search?q=repo%3Aopenjdk%2Fjdk+%22setsockopt%22&type=code</a></span><o:p></o:p></p>
<p class="MsoNormal"><span lang="en-DE"> </span><o:p></o:p></p>
<p class="MsoNormal"><span lang="EN-US">but the check is omitted at some places .</span><o:p></o:p></p>
</blockquote>
<p class="MsoNormal"><span style="mso-fareast-language:#2000"><br>
The setsockopt usages in ping4 and ping6 (Inet4Address.c and Inet6Address.c) should probably have checks.<br>
<br>
There are a few others where they are set when supported. An argument could be made to have these handle other errors. So I think it means working through them on a case-by-case basis.<br>
<br>
-Alan<o:p></o:p></span></p>
</div>
</body>
</html>