[jitsi-dev] SIP Via/Contact headers have wrong IP address on multhomed Mac


#1

Ingo,

:Would you be able to compile and run this the following snippet/
:application on your multihomed machine on Java 6 and Java 8 and post
:us the output?

I don't have Java8 just yet (haven't run into a management GUI that
needs it, though I'm sure that'll happen when Java7 EOLs). I only
have the Apple Java6 javac -- not newer JDKs. Having said that:

$ javac -version
javac 1.6.0_65
$ javac SocketBindExample.java

It works with Apple Java6...

$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
$ java SocketBindExample
Specify an IP address or hostname to connect to.
$ java SocketBindExample 192.168.1.2
/192.168.1.11

...and appears to break with Oracle Java7:

$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample
Specify an IP address or hostname to connect to.
$ /Library/Internet\ Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample 192.168.1.2
0.0.0.0/0.0.0.0

I assume 0.0.0.0 will map to the IP corresponding to the default
route which in my case is a 10.x.x.x IP, not the 192.168 subnet
that my SIP proxy (192.168.1.2) resides on.

HTH,
-Mike

···

--
Michael J. O'Connor mjo@dojo.mi.org
=--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--=
"Things fall apart... it's scientific." -Talking Heads


#2

Sounds like we should either provide native address retrievers for OS X
like on windows, or switch to J8

···

On Monday, February 9, 2015, Mike O'Connor <mjo@dojo.mi.org> wrote:

Ingo,

:Would you be able to compile and run this the following snippet/
:application on your multihomed machine on Java 6 and Java 8 and post
:us the output?

I don't have Java8 just yet (haven't run into a management GUI that
needs it, though I'm sure that'll happen when Java7 EOLs). I only
have the Apple Java6 javac -- not newer JDKs. Having said that:

javac \-version javac 1\.6\.0\_65 javac SocketBindExample.java

It works with Apple Java6...

java \-version java version &quot;1\.6\.0\_65&quot; Java\(TM\) SE Runtime Environment \(build 1\.6\.0\_65\-b14\-462\-11M4609\) Java HotSpot\(TM\) 64\-Bit Server VM \(build 20\.65\-b04\-462, mixed mode\) java SocketBindExample
Specify an IP address or hostname to connect to.
$ java SocketBindExample 192.168.1.2
/192.168.1.11

...and appears to break with Oracle Java7:

/Library/Internet\\ Plug\-Ins/JavaAppletPlugin\.plugin/Contents/Home/bin/java \-version java version &quot;1\.7\.0\_75&quot; Java\(TM\) SE Runtime Environment \(build 1\.7\.0\_75\-b13\) Java HotSpot\(TM\) 64\-Bit Server VM \(build 24\.75\-b04, mixed mode\) /Library/Internet\
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample
Specify an IP address or hostname to connect to.
$ /Library/Internet\
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample
192.168.1.2
0.0.0.0/0.0.0.0

I assume 0.0.0.0 will map to the IP corresponding to the default
route which in my case is a 10.x.x.x IP, not the 192.168 subnet
that my SIP proxy (192.168.1.2) resides on.

HTH,
-Mike

--
Michael J. O'Connor
mjo@dojo.mi.org <javascript:;>

=--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--=
"Things fall apart... it's scientific." -Talking
Heads

--
--sent from my mobile


#3

I assume 0.0.0.0 will map to the IP corresponding to the default
route which in my case is a 10.x.x.x IP, not the 192.168 subnet
that my SIP proxy (192.168.1.2) resides on.

This should be fixed now with the latest nightly. Can you please give it a
try?

HTH,
-Mike

Ingo


#4

Sounds like we should either provide native address retrievers for OS X like
on windows, or switch to J8

As Damian mentioned, we are already on Java 8. However that makes no difference: it returns 0.0.0.0 even for non-multihomed clients. So yes, we either need to do a JNI call or find some other way to obtain the source IP (listing the routing table maybe).

Ingo


#5

Sounds like we should either provide native address retrievers for OS X like
on windows, or switch to J8

We have already updated both windows and mac with latest java8.

···

On Mon, Feb 9, 2015 at 2:27 AM, Emil Ivov <emcho@jitsi.org> wrote:

On Monday, February 9, 2015, Mike O'Connor <mjo@dojo.mi.org> wrote:

Ingo,

:Would you be able to compile and run this the following snippet/
:application on your multihomed machine on Java 6 and Java 8 and post
:us the output?

I don't have Java8 just yet (haven't run into a management GUI that
needs it, though I'm sure that'll happen when Java7 EOLs). I only
have the Apple Java6 javac -- not newer JDKs. Having said that:

$ javac -version
javac 1.6.0_65
$ javac SocketBindExample.java

It works with Apple Java6...

$ java -version
java version "1.6.0_65"
Java(TM) SE Runtime Environment (build 1.6.0_65-b14-462-11M4609)
Java HotSpot(TM) 64-Bit Server VM (build 20.65-b04-462, mixed mode)
$ java SocketBindExample
Specify an IP address or hostname to connect to.
$ java SocketBindExample 192.168.1.2
/192.168.1.11

...and appears to break with Oracle Java7:

$ /Library/Internet\
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java -version
java version "1.7.0_75"
Java(TM) SE Runtime Environment (build 1.7.0_75-b13)
Java HotSpot(TM) 64-Bit Server VM (build 24.75-b04, mixed mode)
$ /Library/Internet\
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample
Specify an IP address or hostname to connect to.
$ /Library/Internet\
Plug-Ins/JavaAppletPlugin.plugin/Contents/Home/bin/java SocketBindExample
192.168.1.2
0.0.0.0/0.0.0.0

I assume 0.0.0.0 will map to the IP corresponding to the default
route which in my case is a 10.x.x.x IP, not the 192.168 subnet
that my SIP proxy (192.168.1.2) resides on.

HTH,
-Mike

--
Michael J. O'Connor
mjo@dojo.mi.org

=--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--==--=
"Things fall apart... it's scientific." -Talking
Heads

--
--sent from my mobile

_______________________________________________
dev mailing list
dev@jitsi.org
Unsubscribe instructions and other list options:
http://lists.jitsi.org/mailman/listinfo/dev