<?xml version="1.0" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://www.jacorb.org/bugzilla/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.2"
          urlbase="https://www.jacorb.org/bugzilla/"
          
          maintainer="jacorb@goots.org"
>

    <bug>
          <bug_id>998</bug_id>
          
          <creation_ts>2014-11-12 06:09:06 +0000</creation_ts>
          <short_desc>Wrong local host address determined on multihomed hosts</short_desc>
          <delta_ts>2014-12-03 03:43:09 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>JacORB</product>
          <component>ORB</component>
          <version>3.5</version>
          <rep_platform>PC</rep_platform>
          <op_sys>Windows NT</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>P5</priority>
          <bug_severity>major</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Jens Vagts">jens</reporter>
          <assigned_to name="Mailinglist to track bugs">jacorb-bugs</assigned_to>
          <cc>jacorb</cc>
          

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>3235</commentid>
    <comment_count>0</comment_count>
    <who name="Jens Vagts">jens</who>
    <bug_when>2014-11-12 06:09:06 +0000</bug_when>
    <thetext>Due to a enhancement within jacorb 3.5 (see here: https://github.com/JacORB/JacORB/commit/bcb220ba117e5a4ce9978d8008ab173244975067) the order of IPv4 addresses deliverd by the system gets reversed!
Since the new logic uses addFirst() instead of simply add(), the last IPv4 address/network adapter gets the first in the resulting list. The as primary the method org.jacorb.orb.iiop.IIOPAddress.getLocalHost() uses the first address of this list (which is the last in the system).</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3236</commentid>
    <comment_count>1</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-11-12 06:32:14 +0000</bug_when>
    <thetext>Can you run ifconfig to show your OS config and also run org.jacorb.util.Diagnostic ?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3237</commentid>
    <comment_count>2</comment_count>
    <who name="Jens Vagts">jens</who>
    <bug_when>2014-11-12 07:14:29 +0000</bug_when>
    <thetext>ipconfig:
=========
Windows IP Configuration


Ethernet adapter Hausnetz:

   Connection-specific DNS Suffix  . : mydomain.de
   IPv4 Address. . . . . . . . . . . : 10.49.4.111
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . : 10.49.4.1

Ethernet adapter VMware Network Adapter VMnet1:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::50f2:5478:714d:ae6f%14
   IPv4 Address. . . . . . . . . . . : 192.168.42.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VMware Network Adapter VMnet8:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::8166:4bd9:927c:cf6f%15
   IPv4 Address. . . . . . . . . . . : 192.168.88.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :

Ethernet adapter VirtualBox Host-Only Network:

   Connection-specific DNS Suffix  . :
   Link-local IPv6 Address . . . . . : fe80::844c:5d4e:144f:868b%18
   IPv4 Address. . . . . . . . . . . : 192.168.56.1
   Subnet Mask . . . . . . . . . . . : 255.255.255.0
   Default Gateway . . . . . . . . . :


org.jacorb.util.Diagnostic:
===========================
JacORB Version: JacORB V3.5 (www.jacorb.org)
        (C) The JacORB project 1997-2014
        11 July 2014 with SHA 0620c4ad

Operating system name: Windows 7
Operating system version: 6.1
Operating system architecture: amd64
Java Vendor: Oracle Corporation
Java Version: 1.7.0_71
Runtime max memory: 2731M

Found the following network addresses:
    /192.168.56.1 / mycomputer.mydomain.de
    /192.168.88.1 / mycomputer.mydomain.de
    /192.168.42.1 / mycomputer.mydomain.de
    /10.49.4.111 / mycomputer.mydomain.de
    /fe80:0:0:0:0:5efe:c0a8:3801%17 / fe80:0:0:0:0:5efe:c0a8:3801%17
    /fe80:0:0:0:0:5efe:c0a8:5801%13 / fe80:0:0:0:0:5efe:c0a8:5801%13
    /fe80:0:0:0:0:5efe:c0a8:2a01%12 / fe80:0:0:0:0:5efe:c0a8:2a01%12
    /fe80:0:0:0:0:5efe:a31:46f%11 / fe80:0:0:0:0:5efe:a31:46f%11
    /127.0.0.1 / 127.0.0.1
    /0:0:0:0:0:0:0:1 / 0:0:0:0:0:0:0:1
    /fe80:0:0:0:50f2:5478:714d:ae6f%14 / mycomputer.mydomain.de
    /fe80:0:0:0:8166:4bd9:927c:cf6f%15 / mycomputer.mydomain.de
    /fe80:0:0:0:844c:5d4e:144f:868b%18 / mycomputer.mydomain.de
Preferred non-loopback address /192.168.56.1

Default locale en_US (which is English (United States))
System file encoding property: Cp1252
Cannonical encoding: Cp1252
Default WChar encoding: UTF16

INFO Initialising ORB with ID:
WARNING Warning - unknown codeset (Cp1252) - defaulting to ISO-8859-1
INFO InterceptorManager started with 0 Server Interceptors, 0 Client Interceptors and 1 IOR Interceptors
Created ORB org.jacorb.orb.ORB

===========================
As you can see: the order of adapters is reversed and the main issue for me: the primary/preferred IP address becomes a virtual network adapter resulting is corba objects bound to this wrong/internal address.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>3246</commentid>
    <comment_count>3</comment_count>
    <who name="Nick Cross">jacorb</who>
    <bug_when>2014-12-03 03:43:09 +0000</bug_when>
    <thetext>
Fixed by SHA 74373300a84ad72e32cc920d2d4eab28db90f88c

Thanks to Jens for lots of help debugging and running multiple custom builds to test the fix!</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>