Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 1 Jan 2014 21:10:01 GMT
From:      =?ISO-8859-1?Q?Olivier_Cochard=2DLabb=E9?= <olivier@cochard.me>
To:        freebsd-bugs@FreeBSD.org
Subject:   Re: kern/185395: IPv4 Multicast broken in 10.x
Message-ID:  <201401012110.s01LA13d016922@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help
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@cochard.me>
To: Peter Jeremy <peter@rulingia.com>, Gleb Smirnoff <glebius@freebsd.org>
Cc: freebsd-gnats-submit <FreeBSD-gnats-submit@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@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">&lt;<a href=3D"m=
 ailto:peter@rulingia.com" target=3D"_blank">peter@rulingia.com</a>&gt;</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>
 &gt;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>
 &gt;Fix:<br>
 =A0 =A0 =A0 =A0 Unknown. =A0The cause isn&#39;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 &quot;Add const qualifier to the dst parameter of =
 the ifnet if_output method&quot; (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(&amp;SIN(dst)-&gt;sin_addr, des=
 ten);<br></div><div><br></div><div>=3D&gt; If the &#39;structure dst&#39; i=
 n now a &#39;const struct dst&#39;, can the struct &#39;dst&#39; still be m=
 odified by the macro ??</div>
 
 <div>(I&#39;m learning C, and don&#39;t understand this complex code).</div=
 ><div><br></div><div>Regards,</div><div><br></div><div>Olivier</div></div><=
 /div></div>
 
 --047d7b86db46eafcdb04eeef03ad--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401012110.s01LA13d016922>