Subject: igmp not working
To: None <tech-net@NetBSD.org>
From: Love <lha@stacken.kth.se>
List: tech-net
Date: 07/14/2003 17:06:00
--=-=-=
Content-Transfer-Encoding: quoted-printable


igmp doesn't respond to igmp query messages since the code look at the old
list (the change 2003/06/15 by matt changed it to a hashtable).

Now I can watch IETF-57 w/o restarting the multicast apps all the time (to
force a igmp report)

Love

Index: ip_input.c
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /sources/netbsd/NetBSD-cvs/src/sys/netinet/ip_input.c,v
retrieving revision 1.169
diff -u -r1.169 ip_input.c
=2D-- ip_input.c	30 Jun 2003 07:54:28 -0000	1.169
+++ ip_input.c	14 Jul 2003 14:42:02 -0000
@@ -223,7 +223,6 @@
 struct	in_ifaddrhashhead *in_ifaddrhashtbl;
 u_long	in_multihash;				/* size of hash table - 1 */
 int	in_multientries;			/* total number of addrs */
=2Dstruct	in_multihead in_multi;
 struct	in_multihashhead *in_multihashtbl;
 struct	ifqueue ipintrq;
 struct	ipstat	ipstat;
Index: in_var.h
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
RCS file: /sources/netbsd/NetBSD-cvs/src/sys/netinet/in_var.h,v
retrieving revision 1.46
diff -u -r1.46 in_var.h
=2D-- in_var.h	26 Jun 2003 00:43:32 -0000	1.46
+++ in_var.h	14 Jul 2003 14:43:08 -0000
@@ -140,7 +140,6 @@
 LIST_HEAD(in_ifaddrhashhead, in_ifaddr);	/* Type of the hash head */
 TAILQ_HEAD(in_ifaddrhead, in_ifaddr);		/* Type of the list head */
 LIST_HEAD(in_multihashhead, in_multi);		/* Type of the hash head */
=2DLIST_HEAD(in_multihead, in_multi);		/* Type of the list head */
=20
=20
 extern	u_long in_ifaddrhash;			/* size of hash table - 1 */
@@ -151,7 +150,6 @@
 extern	u_long in_multihash;			/* size of hash table - 1 */
 extern	int	in_multientries;		/* total number of addrs */
 extern  struct in_multihashhead *in_multihashtbl;	/* Hash table head */
=2Dextern  struct in_multihead in_multi;		/* List head (in ip_input) */
=20
 extern	struct	ifqueue	ipintrq;		/* ip packet input queue */
 extern	const	int	inetctlerrmap[];
@@ -255,6 +253,7 @@
  * all of the in_multi records.
  */
 struct in_multistep {
+	int i_n;
 	struct in_multi *i_inm;
 };
=20
@@ -285,6 +284,8 @@
 	/* struct in_multistep  step; */ \
 	/* struct in_multi *inm; */ \
 { \
+	while ((step).i_inm =3D=3D NULL && (step).i_n < IN_MULTI_HASH_SIZE) \
+		(step).i_inm =3D LIST_FIRST(&in_multihashtbl[++(step).i_n]); \
 	if (((inm) =3D (step).i_inm) !=3D NULL) \
 		(step).i_inm =3D LIST_NEXT((inm), inm_list); \
 }
@@ -293,7 +294,8 @@
 	/* struct in_multistep step; */ \
 	/* struct in_multi *inm; */ \
 { \
=2D	(step).i_inm =3D LIST_FIRST(&in_multi); \
+	(step).i_n =3D 0; \
+	(step).i_inm =3D LIST_FIRST(&in_multihashtbl[0]); \
 	IN_NEXT_MULTI((step), (inm)); \
 }
=20

--=-=-=
Content-Type: application/pgp-signature

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

iQIVAwUAPxLG5hZyDLTSep3UAQK0EhAAnt4sGnzUANlM/73DuhceHjwN9lAd/hZW
IPSxpVtfl1XnROVtedWvWjJtnG70+ROVtfsKEm5uTRH5qQVX1wCNyJSOPf6j5AQv
oeNKBSqmyKQji3Sni+lU+iO2yzxGPjZa2/slX62VoPJrU+I3cuM3mqClg0ejzdky
6uJ+uFuWqpJB59qDrbexpr55moWU5ovdnGXLCnjoo8ogKVvyU50gPc5T5zf9+r3o
iXk5Ww5GdR2UecD3pN2a5U0byaNx6RigBMK6mQQMdwANglwD4QIqIpKdkH710XrF
Qob8ZGaCn9Jwb/DJHAC2oFpEpvY98DGi5xe/RQClR4HmTKP/bDDPm+wLMn4QexO1
yxYMydGaB3quf7D5iRVvM4bMCPLUexwQ4pKnSSGa7AH3YrAf9tpSjOeE5ec1ENvC
KY+ilrCrYl0gfDlw+goxy13rFtJm3zH0u9ftiSyvBel9YrcwaZk4yBawVOUQm2hx
IpPGk7T6h79BPf19zTsGP5yayDJE343kq1nkt0DSeHvziDzZGerUM0wOpzPDcft8
MnfaEhGpNrmhURyYjfnOa4c6tVG7I1/NylMhu8qLOv3cvi+OfD3b0WEKVPVBCp/1
8ZKVpuyn8CJ3TZ9pOTIrpBpWnt2oSr8IWrl1R3RfKUzVBEE+vxi8Xxz8Ja57YwBe
VEAJpUlj7/k=
=iAWd
-----END PGP SIGNATURE-----
--=-=-=--