All of lore.kernel.org
 help / color / mirror / Atom feed
From: Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
To: "Denis V. Lunev" <den-3ImXcnM4P+0@public.gmane.org>
Cc: containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org,
	"Eric W. Biederman"
	<ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.org>
Subject: Re: [Devel] Re: [patch 0/2][NETNS49][IPV4][IGMP] activate multicast per	namespace
Date: Mon, 15 Oct 2007 18:14:41 +0200	[thread overview]
Message-ID: <471391F1.4090804@fr.ibm.com> (raw)
In-Reply-To: <47132576.6020508-3ImXcnM4P+0@public.gmane.org>

Denis V. Lunev wrote:
> Daniel Lezcano wrote:
>> Eric W. Biederman wrote:
>>> Daniel Lezcano <dlezcano-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org> writes:
>>>
>>>> The following patches activate the multicast sockets for
>>>> the namespaces. The results is a traffic going through differents 
>>>> namespaces. So if there are several applications
>>>> listenning to the same multicast group/port, running in
>>>> different namespaces, they will receive multicast packets.
>>>
>>> At a first glance this feels wrong.  I don't see any per
>>> namespace filtering of multicast traffic.  Unless the
>>> multicast traffic is routed/bridged between namespaces
>>> it should be possible to send multicast traffic in one
>>> namespace and listen for that same traffic in another
>>> namespace and not get it.
>>
>> The described behavior is the case were the namespaces are 
>> communicating via veth like:
>>
>> eth0
>>  |
>>  |        ------------- nsA
>> veth0 <--|--> veth1    |
>>  |        -------------
>>  |
>>  |        -------------nsB
>> veth2 <--|--> veth3    |
>>           -------------
>>
>>
>> If an application is listening in nsA and nsB. And if in nsA, an 
>> application sends multicast traffic, both will receive the packets 
>> because they are routed by the pair device.
>> As you said this is the correct behavior, if we have two machines 
>> hostA and hostB in the same network and both are listening on the 
>> multicast address and if an application on hostA send multicast 
>> packets, both should receive the multicast packets.
>> If the traffic is not routed, multicast will not pass through the 
>> namespaces.
>>
>> The description I gave in the patchset introduction was to describe 
>> such behavior which is, IMHO, important for inter-container 
>> communication.
>> Perhaps, I should have not gave this description which seems to sow 
>> confusion in mind, sorry for that.
>>
>> Anyway, I hope the patchset is ok :)
> 
> hmm, by the way, will this work with macvlan?

I will check that. At the first glance, IMO it will not work if the 
IP_MULTICAST_LOOP option is not set. Need to check ...

> also, I am dumb with multicasts :) who will clone the packet if there 
> are more than one namespace listen and there are some listeners behind 
> ethernet?

For local delivery, the function is:

	__udp4_lib_mcast_deliver

For packet emission and loopbacking packets to ourself, it is:

	ip_mc_output

For behind ethernet, the packet is multicasted to the network, so it is 
up the peers to manage the packet.

  parent reply	other threads:[~2007-10-15 16:14 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-10-12 17:10 [patch 0/2][NETNS49][IPV4][IGMP] activate multicast per namespace Daniel Lezcano
2007-10-12 17:10 ` [patch 1/2][NETNS49][IPV4][IGMP] make igmp proc " Daniel Lezcano
2007-10-12 17:10 ` [patch 2/2][NETNS49][IPV4][IGMP] make igmp " Daniel Lezcano
     [not found] ` <20071012171013.105324992-WECHFHqYCmGD/CxQmPlnQ0FT0OZdM7KVQQ4Iyu8u01E@public.gmane.org>
2007-10-12 18:50   ` [patch 0/2][NETNS49][IPV4][IGMP] activate multicast " Eric W. Biederman
     [not found]     ` <m17ils9ngz.fsf-T1Yj925okcoyDheHMi7gv2pdwda3JcWeAL8bYrjMMd8@public.gmane.org>
2007-10-12 21:03       ` Daniel Lezcano
     [not found]         ` <470FE130.8040403-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-12 21:37           ` Eric W. Biederman
2007-10-15  8:31           ` [Devel] " Denis V. Lunev
     [not found]             ` <47132576.6020508-3ImXcnM4P+0@public.gmane.org>
2007-10-15 16:14               ` Daniel Lezcano [this message]
     [not found]                 ` <471391F1.4090804-NmTC/0ZBporQT0dZR+AlfA@public.gmane.org>
2007-10-15 18:03                   ` Eric W. Biederman

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=471391F1.4090804@fr.ibm.com \
    --to=dlezcano-nmtc/0zbporqt0dzr+alfa@public.gmane.org \
    --cc=containers-qjLDD68F18O7TbgM5vRIOg@public.gmane.org \
    --cc=den-3ImXcnM4P+0@public.gmane.org \
    --cc=ebiederm-aS9lmoZGLiVWk0Htik3J/w@public.gmane.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.