Subject: ipv4 multicast broken in -current
To: None <tech-net@netbsd.org>
From: Quentin Garnier <cube@cubidou.net>
List: tech-net
Date: 08/28/2007 23:11:33
--pdljsUaSfr6a298O
Content-Type: multipart/mixed; boundary="cUlGATvL9lcudEbI"
Content-Disposition: inline


--cUlGATvL9lcudEbI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

Hi,

Jared McNeill privately reported an issue with ipv4 multicast on
-current.  After some light debugging, I tend to believe rev 1.180 of
sys/net/ip_output.c is the culprit, and naively suggest the attached
patch, which restore a chunk of code that David removed.

David, do you think this is the right thing to do?  I'm not able to
test just right now, but will be a bit later.

--=20
Quentin Garnier - cube@cubidou.net - cube@NetBSD.org
"You could have made it, spitting out benchmarks
Owe it to yourself not to fail"
Amplifico, Spitting Out Benchmarks, Hometakes Vol. 2, 2005.

--cUlGATvL9lcudEbI
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=diff

Index: ip_output.c
===================================================================
RCS file: /cvsroot/src/sys/netinet/ip_output.c,v
retrieving revision 1.180
diff -u -r1.180 ip_output.c
--- ip_output.c	2 May 2007 20:40:25 -0000	1.180
+++ ip_output.c	28 Aug 2007 21:06:10 -0000
@@ -360,6 +360,12 @@
 		m->m_flags |= (ip->ip_dst.s_addr == INADDR_BROADCAST) ?
 			M_BCAST : M_MCAST;
 		/*
+		 * IP destination address is multicast.  Make sure "dst"
+		 * still points to the address in "ro".  (It may have been
+		 * changed to point to a gateway address, above.)
+		 */
+		dst = satocsin(rtcache_getdst(ro));
+		/*
 		 * See if the caller provided any multicast options
 		 */
 		if (imo != NULL)

--cUlGATvL9lcudEbI--

--pdljsUaSfr6a298O
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (NetBSD)

iQEVAwUBRtSPhdgoQloHrPnoAQJsHAf+La70M5e0zG9/gR1UrOAQHFN51juDR2YH
rLI2rmzq5NjJNC7Y6zELMbykzU5yA3VMRjxn5Cv/7lpt0+K/o+c2yEKRrzAWeCaW
b/P21uvtbz9TFrV38FFeQFm20Zi+gdMmcpgO1CKLAgtiykGIIPWK6wU0679n16Zr
piQJgHwE/JX7ZnBMNaPLwK3MvCjAoa+Miv62H+jJBwQvE5xNPQyCnscbng5/IS1i
nPYXbmlMiQ/V+a8j9BJn3rxCvhQH3rpVlOVuThfNoAKSWK5GkxNfINsv41ybe3iw
EkYHHa22GQwNrTQi7RsTe3eY1WVY6h9dnuOMcTLYQNcMGkSNI7A+Zw==
=nMQu
-----END PGP SIGNATURE-----

--pdljsUaSfr6a298O--