RFR 8168840: InetAddress.getByName() throws java.net.UnknownHostException no such interface when used with virtual interfaces on Solaris
Vyom Tewari
vyom.tewari at oracle.com
Wed Dec 21 10:20:36 UTC 2016
incorporated the
comments(http://cr.openjdk.java.net/~vtewari/8168840/webrev0.2/index.html
<http://cr.openjdk.java.net/%7Evtewari/8168840/webrev0.2/index.html>).
Thanks,
Vyom
On Wednesday 21 December 2016 02:58 PM, Langer, Christoph wrote:
> Hi Vyom,
>
> looks good, thanks for the update.
>
> Minor formatting:
> - Add a blank line between line 258/259 and 268/269 in the new file version.
> - line 259 //search the child list - add a space between "//" and "search..."
>
> Disclaimer: I'm not an official reviewer.
>
> Best regards
> Christoph
>
>> -----Original Message-----
>> From: net-dev [mailto:net-dev-bounces at openjdk.java.net] On Behalf Of Vyom
>> Tewari
>> Sent: Mittwoch, 21. Dezember 2016 09:51
>> Cc: net-dev <net-dev at openjdk.java.net>
>> Subject: Re: RFR 8168840: InetAddress.getByName() throws
>> java.net.UnknownHostException no such interface when used with virtual
>> interfaces on Solaris
>>
>> Hi All,
>>
>> Please find the latest
>> webrev(http://cr.openjdk.java.net/~vtewari/8168840/webrev0.1/index.html
>> <http://cr.openjdk.java.net/%7Evtewari/8168840/webrev0.1/index.html>).
>>
>> Thanks,
>>
>> Vyom
>>
>>
>> On Tuesday 13 December 2016 01:38 PM, Langer, Christoph wrote:
>>> Hi Vyom,
>>>
>>> thanks for looking at this. Overall your fix and test look good to me.
>>>
>>> The coding to do the parent search and if required a child search in
>> Java_java_net_NetworkInterface_getByName0 could be done a bit more
>> straightforward, e.g. like this:
>>> // search the list of interfaces by name
>>> // for virtual interfaces we need to find the parent first
>>> colonp = strchr(name_utf, ':');
>>> if (colonp == NULL) {
>>> searchName = name_utf;
>>> } else {
>>> jio_snprintf(pname, IFNAMESIZE, "%.*s", colonp - name_utf);
>>> searchName = pname;
>>> }
>>> curr = ifs;
>>> while (curr != NULL) {
>>> if (strcmp(searchName, curr->name) == 0) {
>>> break;
>>> }
>>> curr = curr->next;
>>> }
>>>
>>> // search the child list
>>> if (curr != NULL && colonp != NULL) {
>>> curr = curr->childs;
>>> while (curr != NULL) {
>>> if (strcmp(name_utf, curr->name) == 0) {
>>> break;
>>> }
>>> curr = curr->next;
>>> }
>>> }
>>>
>>> Best regards
>>> Christoph
>>>
>>>> -----Original Message-----
>>>> From: net-dev [mailto:net-dev-bounces at openjdk.java.net] On Behalf Of
>> Vyom
>>>> Tewari
>>>> Sent: Dienstag, 13. Dezember 2016 04:47
>>>> To: net-dev <net-dev at openjdk.java.net>
>>>> Subject: RFR 8168840: InetAddress.getByName() throws
>>>> java.net.UnknownHostException no such interface when used with virtual
>>>> interfaces on Solaris
>>>>
>>>> Hi,
>>>>
>>>> Please review the code changes for below issue.
>>>>
>>>> BugId : https://bugs.openjdk.java.net/browse/JDK-8168840
>>>>
>>>> webrev :
>>>> http://cr.openjdk.java.net/~vtewari/8168840/webrev0.0/index.html
>>>> <http://cr.openjdk.java.net/%7Evtewari/8168840/webrev0.0/index.html>
>>>>
>>>> Thanks,
>>>>
>>>> Vyom
More information about the net-dev
mailing list