From: "Yurij M. Plotnikov" <Yurij.Plotnikov@oktetlabs.ru>
To: Eric Dumazet <eric.dumazet@gmail.com>
Cc: netdev@vger.kernel.org,
"Alexandra N. Kossovsky" <Alexandra.Kossovsky@oktetlabs.ru>,
Shawn Bohrer <sbohrer@rgmadvisors.com>
Subject: Re: Socket receives packet to multicast group to which it was not joined since kernel 3.13.10-1
Date: Tue, 13 May 2014 10:25:37 +0400 [thread overview]
Message-ID: <5371BAE1.2090806@oktetlabs.ru> (raw)
In-Reply-To: <1399915082.7973.27.camel@edumazet-glaptop2.roam.corp.google.com>
On 12/05/14 21:18, Eric Dumazet wrote:
> On Mon, 2014-05-12 at 20:38 +0400, Yurij M. Plotnikov wrote:
>> On kernel 3.13.10-1 I see that socket joined to one multicast group
>> receives packets to another multicast address. That can be reproduced by
>> the following example:
>>
>> 1. socket(DGRAM) -> 3
>> 2. bind(3, 0.0.0.0:12345) -> 0
>> 3. setsockopt(3, IP_MULTICAST_IF, {224.168.2.9, 7}) -> 0
>> // "7" is correct interface index
>>
>> 4. Send packet from peer host to 224.168.2.9:12345
>> 5. poll({3, POLLIN}) -> 1
>> 6. recv(3) -> <data_length>
>>
>> 5. Send packet from peer host to 225.168.2.9:12345
>> // Note that the address is not the same!
>> 6. poll({3, POLLIN}) -> 1
>> 7. recv(3) -> <data_length>
>>
>> I checked kernel 3.12.6-2, there is no such problem. I have placed
>> simple C-program in attachment to reproduce the behaviour. It should be
>> called:
>> ./mult_recv <mcast_address> <interface index> i.e. in example above:
>> ./mult_recv 224.168.2.9 7
>
> I suspect problem came with commit
> 421b3885bf6d56391297844f43fb7154a6396e12
> ("udp: ipv4: Add udp early demux")
>
> Is that better if you try :
>
> echo 0 >/proc/sys/net/ipv4/ip_early_demux
>
Yes, this fixes the problem.
next prev parent reply other threads:[~2014-05-13 6:25 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-12 16:38 Socket receives packet to multicast group to which it was not joined since kernel 3.13.10-1 Yurij M. Plotnikov
2014-05-12 17:18 ` Eric Dumazet
2014-05-13 6:25 ` Yurij M. Plotnikov [this message]
2014-05-13 21:36 ` Shawn Bohrer
2014-05-14 20:40 ` Shawn Bohrer
2015-05-24 4:55 ` Oliver Graff
2015-05-26 17:41 ` Shawn Bohrer
2015-05-26 17:59 ` Eric Dumazet
2015-06-01 16:34 ` [PATCH] ipv4/udp: Verify multicast group is ours in upd_v4_early_demux() Shawn Bohrer
2015-06-01 20:11 ` Sergei Shtylyov
2015-06-03 21:27 ` [PATCH v2] " Shawn Bohrer
2015-06-04 7:46 ` David Miller
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=5371BAE1.2090806@oktetlabs.ru \
--to=yurij.plotnikov@oktetlabs.ru \
--cc=Alexandra.Kossovsky@oktetlabs.ru \
--cc=eric.dumazet@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=sbohrer@rgmadvisors.com \
/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).