netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andrew Morton <akpm@linux-foundation.org>
To: netdev@vger.kernel.org
Cc: bugzilla-daemon@bugzilla.kernel.org,
	bugme-daemon@bugzilla.kernel.org, manlidj@hotmail.com
Subject: Re: [Bugme-new] [Bug 13856] New: sk_bound_dev_if should be set for a socket when using IP_MULITCAST_IF or IP_ADD_MEMBERSHIO
Date: Wed, 29 Jul 2009 12:52:03 -0700	[thread overview]
Message-ID: <20090729125203.efbcb7ef.akpm@linux-foundation.org> (raw)
In-Reply-To: <bug-13856-10286@http.bugzilla.kernel.org/>


(switched to email.  Please respond via emailed reply-to-all, not via the
bugzilla web interface).

On Tue, 28 Jul 2009 03:42:38 GMT
bugzilla-daemon@bugzilla.kernel.org wrote:

> http://bugzilla.kernel.org/show_bug.cgi?id=13856
> 
>            Summary: sk_bound_dev_if should be set for a socket when using
>                     IP_MULITCAST_IF or IP_ADD_MEMBERSHIO
>            Product: Networking
>            Version: 2.5
>     Kernel Version: 2.6.27.7
>           Platform: All
>         OS/Version: Linux
>               Tree: Mainline
>             Status: NEW
>           Severity: normal
>           Priority: P1
>          Component: IPV4
>         AssignedTo: shemminger@linux-foundation.org
>         ReportedBy: manlidj@hotmail.com
>         Regression: No
> 
> 
> Currently there is no way to tell which interface a multicast packet arrived on
> except by using a raw socket and issuing the SO_BINDTODEVICE option which
> forces the sk_bound_dev_if for the socket to be set.  
> 
> Consider a multi-homed system where a service needs to listen for multicast
> SSDP messages on a number of interfaces.  The system needs to know which
> interface a search message came in on in order to respond with the correct URL. 
> 
> The service needs to join the multicast group on all interfaces.  It must bind
> on INADDR_ANY and then issue the IP_ADD_MEMBERSHIP call.  
> 
> 1. If it uses one socket and joins on all interfaces it will receive mulitcast
> from all interfaces but cannot tell which interface the message came in on
> 
> 2. It it uses a socket per interface each bound on INADDR_ANY and issues
> IP_MULTICAST_IF.  In this case any mulitcast socket, no matter what interface,
> will be forwarded to each socket because sk_bound_dev_if was not set (i.e. 0) -
> see net/ipv4/udp.c [ udp_v4_mcast_next ]
> 
> Suggested solution is to set sk_bound_dev_if when IP_MULTICAST_IF is issued.
> 


       reply	other threads:[~2009-07-29 19:52 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <bug-13856-10286@http.bugzilla.kernel.org/>
2009-07-29 19:52 ` Andrew Morton [this message]
2009-07-30  0:46   ` [Bugme-new] [Bug 13856] New: sk_bound_dev_if should be set for a socket when using IP_MULITCAST_IF or IP_ADD_MEMBERSHIO John Dykstra

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20090729125203.efbcb7ef.akpm@linux-foundation.org \
    --to=akpm@linux-foundation.org \
    --cc=bugme-daemon@bugzilla.kernel.org \
    --cc=bugzilla-daemon@bugzilla.kernel.org \
    --cc=manlidj@hotmail.com \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).