From owner-freebsd-net Thu Jun 6 14:43:34 2002 Delivered-To: freebsd-net@freebsd.org Received: from rwcrmhc52.attbi.com (rwcrmhc52.attbi.com [216.148.227.88]) by hub.freebsd.org (Postfix) with ESMTP id 0973937B403 for ; Thu, 6 Jun 2002 14:43:30 -0700 (PDT) Received: from my.egorovv.net.attbi.com ([12.235.54.40]) by rwcrmhc52.attbi.com (InterMail vM.4.01.03.27 201-229-121-127-20010626) with ESMTP id <20020606214329.EUPD2751.rwcrmhc52.attbi.com@my.egorovv.net.attbi.com> for ; Thu, 6 Jun 2002 21:43:29 +0000 To: freebsd-net@FreeBSD.org Subject: Re: IP_MULTICAST_LOOP References: <86vg8wu5cw.fsf@my.egorovv.net> <20020606113237.N40292-100000@gateway.posi.net> From: Vadim Egorov Date: Thu, 06 Jun 2002 14:43:23 -0700 In-Reply-To: <20020606113237.N40292-100000@gateway.posi.net> (Kelly Yancey's message of "Thu, 6 Jun 2002 11:36:10 -0700 (PDT)") Message-ID: <86r8jkrslg.fsf@my.egorovv.net> Lines: 48 User-Agent: Gnus/5.090004 (Oort Gnus v0.04) Emacs/20.7 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-net@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org Sorry guys for beeng so stupid :( But the problem still in place - it actually boils down to the multicast example from Stivens 'Unix Network Programming' - it casts and lstens to the same group. I tried it on Linux - turning IP_MULTICAST_LOOP off does blocks traffic looping, but on FreeBSD it doesn't seem to have any effect. I think I can live with this, I just feel that somthing is wrong here. > On Thu, 6 Jun 2002, Vadim Egorov wrote: >> I'm playing with multicasting (-stable), and I want to disable looping back >> my outgoing packets setting IP_MULTICAST_LOOP option to 0 but it doen't >> have any effect. My app is listening to the same group it is casting. >> >> > After some grepping I came across some code in netinet/ip_output.c: >> > (imo == NULL || imo->imo_multicast_loop)) { >> > /* >> > * If we belong to the destination multicast group >> > * on the outgoing interface, and the caller did not >> > * forbid loopback, loop back a copy. >> > */ >> > >> > The comment says 'and' but the code says '||' -- looks like an error to me. >> > Except this I've got no idea what it means - does it make amy sence? Kelly Yancey writes: > You definately wouldn't want this to be && because if imo is NULL you > certainly wouldn't want to dereference it. :) The comment's logic matches the > code, it is just that the phrasing is inverted. > > Kelly "Wilbert de Graaf" writes: > Hi Vadim > > I wondered if in general your application does the right thing. You can either: > 1) let the sender listen to another group: logically split your protocol > 2) use IGMPv3 and simply block yourself from listening > I have a patch + examples how to do this at: > http://home.hetnet.nl/~wilbertdg/igmpv3.html > > Thanks, Wilbert -- Thanks, Vadim To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message