Date: Tue, 27 Jun 2006 14:16:20 +0200 From: Max Laier <max@love2party.net> To: Maxim Konovalov <maxim@macomnet.ru> Cc: dsh@vlink.ru, cvs-src@freebsd.org, src-committers@freebsd.org, Bruce M Simpson <bms@freebsd.org>, cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet in.h ip_output.c ip_var.h Message-ID: <200606271416.29255.max@love2party.net> In-Reply-To: <20060627015411.B30917@mp2.macomnet.net> References: <200605141422.k4EEMnmC056704@repoman.freebsd.org> <20060627015411.B30917@mp2.macomnet.net>
next in thread | previous in thread | raw e-mail | index | archive | help
--nextPart1475526.6XgAx0F7cA Content-Type: multipart/mixed; boundary="Boundary-01=_YGSoE3oRbr6fE1H" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_YGSoE3oRbr6fE1H Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 27 June 2006 00:46, Maxim Konovalov wrote: > Hi Bruce, > > On Sun, 14 May 2006, 14:22-0000, Bruce M Simpson wrote: > > bms 2006-05-14 14:22:49 UTC > > > > FreeBSD src repository > > > > Modified files: > > sys/netinet in.h ip_output.c ip_var.h > > Log: > > Fix a long-standing limitation in IPv4 multicast group membership. > > > > By making the imo_membership array a dynamically allocated vector, > > this minimizes disruption to existing IPv4 multicast code. This > > change breaks the ABI for the kernel module ip_mroute.ko, and may > > cause a small amount of churn for folks working on the IGMPv3 merge. > > > > Previously, sockets were subject to a compile-time limitation on > > the number of IPv4 group memberships, which was hard-coded to 20. > > The imo_membership relationship, however, is 1:1 with regards to > > a tuple of multicast group address and interface address. Users who > > ran routing protocols such as OSPF ran into this limitation on machin= es > > with a large system interface tree. > > It seems these changes broke carp(4). Now ifconfig carp0 <ip address> > panics in ip_carp.c::carp_set_addr() when tries to dereference > imo->imo_membership[0] when imo->imo_membership =3D=3D NULL. See attached, for a possible fix. Untested, so be careful. =2D-=20 /"\ Best regards, | mlaier@freebsd.org \ / Max Laier | ICQ #67774661 X http://pf4freebsd.love2party.net/ | mlaier@EFnet / \ ASCII Ribbon Campaign | Against HTML Mail and News --Boundary-01=_YGSoE3oRbr6fE1H Content-Type: text/x-diff; charset="iso-8859-1"; name="ip_carp.imo.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="ip_carp.imo.diff" Index: ip_carp.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: /usr/store/mlaier/fcvs/src/sys/netinet/ip_carp.c,v retrieving revision 1.40 diff -u -r1.40 ip_carp.c =2D-- ip_carp.c 2 Jun 2006 19:59:33 -0000 1.40 +++ ip_carp.c 27 Jun 2006 12:11:41 -0000 @@ -375,6 +375,10 @@ #ifdef INET6 sc->sc_im6o.im6o_multicast_hlim =3D CARP_DFLTTL; #endif + sc->sc_imo.imo_membership =3D (struct in_multi **)malloc( + (sizeof(struct in_multi *) * IP_MIN_MEMBERSHIPS), M_CARP, + M_WAITOK); + sc->sc_imo.imo_max_memberships =3D IP_MIN_MEMBERSHIPS; =20 callout_init(&sc->sc_ad_tmo, NET_CALLOUT_MPSAFE); callout_init(&sc->sc_md_tmo, NET_CALLOUT_MPSAFE); @@ -415,6 +419,7 @@ bpfdetach(ifp); if_detach(ifp); if_free_type(ifp, IFT_ETHER); + free(sc->sc_imo.imo_membership, M_CARP); free(sc, M_CARP); } =20 --Boundary-01=_YGSoE3oRbr6fE1H-- --nextPart1475526.6XgAx0F7cA Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2.2 (FreeBSD) iD8DBQBEoSGdXyyEoT62BG0RAv1BAJ4ttG87OFufQNdPnrD5/plLVz63jgCggHHn Smcnvs7fUvVirsVzFffE4IA= =Vfak -----END PGP SIGNATURE----- --nextPart1475526.6XgAx0F7cA--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200606271416.29255.max>