Menu

#21 Allow multiple interfaces/ip addresses with UpnpInit

Next_Release
pending
nobody
upnp (15)
5
2016-01-07
2012-03-19
No

Currently, UpnpInit only allows for one IP address to be used when initializing. As the documentation already mentions, this is problematic in multi-homed scenarios. Here, one can specify the IP address.
But common multi-homes scenarios are mobile devices connected to the second network (for example a corporate network) via vpn. Specifying the ip in this scenario is not only uncomfortable, for end users, it may well be impossible, as the ip addresses constantly change when moving the portable device to other locations (lans/wlans).
Therefore, I suggest changing UpnpInit to allow for connecting to multiple (and consequently all) available interfaces. Applications could then choose to only connect to interfaces of special types (which should probably not be the scope of libupnp).

Discussion

  • Marcelo Roberto Jimenez

    Hi Nicolai,

    Sorry for the delay in answering.

    I am not interested in developing an API addition, but I only speak for myself, not for the other (few) developers.

    On the other hand, if you provide such a patch, it will be more than welcome.

    Regards,
    Marcelo.

     
  • Marcelo Roberto Jimenez

    • status: open --> pending
    • Group: --> Next_Release
     
  • Sam Chen

    Sam Chen - 2015-07-22

    Hi,

    I am truly want to know the status about this task. Is any resolved?
    If it's fixed, what's the expected version for next_release?

    Thanks.
    Sam

     
  • Sam Chen

    Sam Chen - 2015-07-24

    Hi,

    My purpose is UPnP interface can reply to every IP subnet in multi-homed scenario.
    The URL in LOCATION field can be reachable for different control points.
    UPnP interface mean the interface support UPnP.

    I have two idea to solve, I describe briefly below:
    1. Do the modification in the last.
    In the final tx part, scan all the UPnP interfaces,
    then send NOTIFY or reply(refer to M-SEARCH) through these interface
    (use setsockopt with IP_MULTICAST_IF).
    2. Create multi-process by different UPnP interface.
    In upnpinit(), set setsockopt with SO_BINDTODEVICE.
    So we can receive SSDP packet by different UPnP interface
    (according to kernel routing table), then continue to run the reply.

    I only had test method-1, it's work.
    Is anybody have any idea or suggestion?

    Thanks.
    Sam.

     
  • Marcelo Roberto Jimenez

    Hi Sam Chen,

    The task is stopped, I am waiting for a tested patch to review.

    I have no suggestions, I would really like to hear other oppinions on this matter.

    Regards,
    Marcelo.