mainThe eXtended osip library - Support: sr #108801, eXosip_guess_localip not good for...

 
 

sr #108801: eXosip_guess_localip not good for VPN

Submitter:  Andrew <atimonin>
Submitted:  Thu 16 Apr 2015 03:12:50 PM UTC
   
 
Category:  None Priority:  5 - Normal
Severity:  3 - Normal Status:  Invalid
Privacy:  Public Assigned to:  aymeric
Open/Closed:  Closed Operating System:  GNU/Linux
* Mandatory Fields

Add a New Comment Rich Markup
   

Thu 15 Sep 2016 01:26:43 PM UTC, comment #3: 

Hi Andrew,

This looks to be the same as the current eXosip_guess_localip which is retreiving the local IP address based on the "destination" (and as explained, destination is set using the options: EXOSIP_OPT_SET_IPV4_FOR_GATEWAY, EXOSIP_OPT_SET_IPV6_FOR_GATEWAY.

Most apps will set the above options to be the proxy.

May be we could continue the discussion on the mailing list (osip-dev@gnu.org)

Tks
Aymeric

Aymeric MOIZARD <aymeric>
Group administrator
Thu 15 Sep 2016 01:12:07 PM UTC, comment #2: 

I've wrote a C function to get prefered source address from
a route to some address (see attachment)
You may use it in eXosip_guess_localip.
Though it doesn't hanlde SDP if you are originator
of SIP/SDP I think the best guess would be to
look for route to SIP proxy (at least other end is reachable from proxy).

(file #38516)

Andrew <atimonin>
Sat 03 Sep 2016 02:21:39 PM UTC, comment #1: 

(sorry for the delay in processing savannah reports)

exosip doesn't handle SDP. I do understand that eXosip_guess_localip may not be convenient for such usage.

Despite this, you can configure the default "destination" for exosip:

EXOSIP_OPT_SET_IPV4_FOR_GATEWAY
EXOSIP_OPT_SET_IPV6_FOR_GATEWAY

This will force eXosip_guess_localip to report the default IP to the new gateway (instead of reporting to the default internet). It usually end up being the same, anyway.

eXosip can't anyway do anything for this.

Aymeric MOIZARD <aymeric>
Group administrator
Thu 16 Apr 2015 03:12:50 PM UTC, original submission:  

eXosip_guess_localip is trying to guess source IP address from default route.

Sometimes it's not a good scenario for ex. when I'm connecting via VPN. It is VERY important for SDP.

I may suggest the following:
1. get the destination address
2. find a route to destination, like in shell:
    ip route get <dest_IP>
  you will get:
    <dest_IP> dev <ifname> src <source_IP>
the source_IP is what we need.

Andrew <atimonin>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:
   
   
Comment:
   

Attached Files
file #38516:  getFromAddr.c added by atimonin (7KiB - text/x-csrc)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by aymeric (Posted a comment)
  • -email is unavailable- added by atimonin (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.

     

    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-09-15 atimonin Attached File- Added getFromAddr.c, #38516
    2016-09-03 aymeric StatusNone Invalid
        Assigned toNone aymeric
        Open/ClosedOpen Closed

    Back to the top

    Powered by Savane 3.13-d3ae.
    Corresponding source code