________________________________
From: Zabaluev Mikhail (Nokia-D/Helsinki)
Sent: Monday, February 09, 2009 5:14 PM
To: drostow...@airbiquity.com; sofia-sip-devel@lists.sourceforge.net
Subject: Re: [Sofia-sip-devel] Multiple ethernet interface support?

How does Sofia SIP handle multiple Ethernet interface support? I’m having a 
problem where my linux box has eth0=172.16.1.1, and eth1=192.168.15.115. When 
Sofia sends an INVITE out to the destination 192.168.15.13, my expectation was 
that the source IP address should be 192.168.15.115. However, Ethereal captures 
show the source IP address is actually 172.16.1.1. The INVITE is actually being 
sent out eth1 as I have physically unplugged 172.16.1.1. How does Sofia’s SIP 
socket determine to use eth0’s source IP address? It should be using eth1 as 
the source IP address.
The stack has no clue by default. It binds to INADDR_ANY and uses the first 
interface entry for the source address. There is no standardized way to ask the 
system which route will be taken to reach a destination address (not to mention 
this would be inherently racy). We tried out some Linux-specific magic in our 
team, but this is utterly non-portable and may even break between kernel 
releases. We're not at the stage where it works in a Sofia-SIP branch.
To think of it, a simple heuristic would be to look at the routing table and 
see which interface has the default route. This should work in most cases, e.g. 
VPN. Pekka, what do you think?

Best regards,
  Mikhail
------------------------------------------------------------------------------
Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM)
software. With Adobe AIR, Ajax developers can use existing skills and code to
build responsive, highly engaging applications that combine the power of local
resources and data with the reach of the web. Download the Adobe AIR SDK and
Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com
_______________________________________________
Sofia-sip-devel mailing list
Sofia-sip-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/sofia-sip-devel

Reply via email to