From owner-freebsd-bugs@FreeBSD.ORG Wed Jan 1 21:10:02 2014 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id ECD6EAF6 for ; Wed, 1 Jan 2014 21:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id D869F1572 for ; Wed, 1 Jan 2014 21:10:01 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id s01LA16j016923 for ; Wed, 1 Jan 2014 21:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id s01LA13d016922; Wed, 1 Jan 2014 21:10:01 GMT (envelope-from gnats) Date: Wed, 1 Jan 2014 21:10:01 GMT Message-Id: <201401012110.s01LA13d016922@freefall.freebsd.org> To: freebsd-bugs@FreeBSD.org Cc: From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= Subject: Re: kern/185395: IPv4 Multicast broken in 10.x X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.17 Precedence: list Reply-To: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 01 Jan 2014 21:10:02 -0000 The following reply was made to PR kern/185395; it has been noted by GNATS. From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= To: Peter Jeremy , Gleb Smirnoff Cc: freebsd-gnats-submit Subject: Re: kern/185395: IPv4 Multicast broken in 10.x Date: Wed, 1 Jan 2014 22:03:36 +0100 --047d7b86db46eafcdb04eeef03ad Content-Type: text/plain; charset=ISO-8859-1 On Wed, Jan 1, 2014 at 8:33 PM, Peter Jeremy wrote: > > >Description: > IPv4 multicast ethernet frames use the IP address of the default > route in the destination MAC address, instead of the IP address of > the multicast destination. This breaks multicast filtering at the > receiver. > > This is a regression from FreeBSD 9.2. > > >Fix: > Unknown. The cause isn't obvious from a cursory look at the 9.x > and 10.x code. > And what about the commit 249925 "Add const qualifier to the dst parameter of the ifnet if_output method" (Fri Apr 26 12:50:32 2013 UTC) ? This commit modify function arpresolve() in sys/netinet/if_ether.c by replacing: arpresolve(...,struct sockaddr *dst, ...) by arpresolve(...,const struct sockaddr *dst, ...). And inside this function there is a call to this macro: ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, desten); => If the 'structure dst' in now a 'const struct dst', can the struct 'dst' still be modified by the macro ?? (I'm learning C, and don't understand this complex code). Regards, Olivier --047d7b86db46eafcdb04eeef03ad Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
On W= ed, Jan 1, 2014 at 8:33 PM, Peter Jeremy <peter@rulingia.com> wrote:

>Description:
=A0 =A0 =A0 =A0 IPv4 multicast ethernet frames use the IP address of the de= fault
=A0 =A0 =A0 =A0 route in the destination MAC address, instead of the IP add= ress of
=A0 =A0 =A0 =A0 the multicast destination. =A0This breaks multicast filteri= ng at the
=A0 =A0 =A0 =A0 receiver.

=A0 =A0 =A0 =A0 This is a regression from FreeBSD 9.2.

>Fix:
=A0 =A0 =A0 =A0 Unknown. =A0The cause isn't obvious from a cursory look= at the 9.x
=A0 =A0 =A0 =A0 and 10.x code.

And what= about the commit 249925 "Add const qualifier to the dst parameter of = the ifnet if_output method" (Fri Apr 26 12:50:32 2013 UTC) ?
=

This commit modify function arpresolve() in sys/netinet/if_e= ther.c by replacing:
arpresolve(...,struct sockaddr *dst, ...)
by
arpresolve(...,const struct sockaddr *dst, ...).

And inside this function there is a call to this = macro:
ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, des= ten);

=3D> If the 'structure dst' i= n now a 'const struct dst', can the struct 'dst' still be m= odified by the macro ??
(I'm learning C, and don't understand this complex code).

Regards,

Olivier
<= /div>
--047d7b86db46eafcdb04eeef03ad--