From owner-freebsd-net Thu Jun 6 11:36:22 2002 Delivered-To: freebsd-net@freebsd.org Received: from gateway.posi.net (12-236-90-177.client.attbi.com [12.236.90.177]) by hub.freebsd.org (Postfix) with ESMTP id D2F6E37B401 for ; Thu, 6 Jun 2002 11:36:14 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by gateway.posi.net (8.12.3/8.12.3) with ESMTP id g56IaAM7040381; Thu, 6 Jun 2002 11:36:10 -0700 (PDT) (envelope-from kbyanc@posi.net) Date: Thu, 6 Jun 2002 11:36:10 -0700 (PDT) From: Kelly Yancey To: Vadim Egorov Cc: freebsd-net@FreeBSD.org Subject: Re: IP_MULTICAST_LOOP In-Reply-To: <86vg8wu5cw.fsf@my.egorovv.net> Message-ID: <20020606113237.N40292-100000@gateway.posi.net> 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 On Thu, 6 Jun 2002, Vadim Egorov wrote: > > Hi guys! > > 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? > 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 -- Kelly Yancey -- kbyanc@{posi.net,FreeBSD.org} FreeBSD, The Power To Serve: http://www.freebsd.org/ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-net" in the body of the message