kern/185395: IPv4 Multicast broken in 10.x

Olivier Cochard-Labbé olivier at cochard.me
Wed Jan 1 21:10:02 UTC 2014


The following reply was made to PR kern/185395; it has been noted by GNATS.

From: =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier at cochard.me>
To: Peter Jeremy <peter at rulingia.com>, Gleb Smirnoff <glebius at freebsd.org>
Cc: freebsd-gnats-submit <FreeBSD-gnats-submit at freebsd.org>
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 <peter at rulingia.com> 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
 
 <div dir=3D"ltr"><div class=3D"gmail_extra"><div class=3D"gmail_quote">On W=
 ed, Jan 1, 2014 at 8:33 PM, Peter Jeremy <span dir=3D"ltr"><<a href=3D"m=
 ailto:peter at rulingia.com" target=3D"_blank">peter at rulingia.com</a>></spa=
 n> wrote:<br>
 
 <blockquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-=
 left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;p=
 adding-left:1ex"><br>
 >Description:<br>
 =A0 =A0 =A0 =A0 IPv4 multicast ethernet frames use the IP address of the de=
 fault<br>
 =A0 =A0 =A0 =A0 route in the destination MAC address, instead of the IP add=
 ress of<br>
 =A0 =A0 =A0 =A0 the multicast destination. =A0This breaks multicast filteri=
 ng at the<br>
 =A0 =A0 =A0 =A0 receiver.<br>
 <br>
 =A0 =A0 =A0 =A0 This is a regression from FreeBSD 9.2.<br><br>
 >Fix:<br>
 =A0 =A0 =A0 =A0 Unknown. =A0The cause isn't obvious from a cursory look=
  at the 9.x<br>
 =A0 =A0 =A0 =A0 and 10.x code.<br></blockquote><div><br></div><div>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) ?<br></div>=
 <div>
 
 <br></div><div>This commit modify function arpresolve() in sys/netinet/if_e=
 ther.c by replacing:</div><div>arpresolve(...,struct sockaddr *dst, ...)</d=
 iv><div>by</div><div>arpresolve(...,const struct sockaddr *dst, ...).<br>
 
 </div><div><br></div><div>And inside this function there is a call to this =
 macro:<br></div><div>ETHER_MAP_IP_MULTICAST(&SIN(dst)->sin_addr, des=
 ten);<br></div><div><br></div><div>=3D> If the 'structure dst' i=
 n now a 'const struct dst', can the struct 'dst' still be m=
 odified by the macro ??</div>
 
 <div>(I'm learning C, and don't understand this complex code).</div=
 ><div><br></div><div>Regards,</div><div><br></div><div>Olivier</div></div><=
 /div></div>
 
 --047d7b86db46eafcdb04eeef03ad--


More information about the freebsd-bugs mailing list