From owner-cvs-all@FreeBSD.ORG Tue Jun 27 12:16:45 2006 Return-Path: X-Original-To: cvs-all@freebsd.org Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 94C0116A4B3; Tue, 27 Jun 2006 12:16:45 +0000 (UTC) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.188]) by mx1.FreeBSD.org (Postfix) with ESMTP id 82B9343D7D; Tue, 27 Jun 2006 12:16:31 +0000 (GMT) (envelope-from max@love2party.net) Received: from [88.64.183.95] (helo=amd64.laiers.local) by mrelayeu.kundenserver.de (node=mrelayeu4) with ESMTP (Nemesis), id 0ML21M-1FvCUY17HR-00053H; Tue, 27 Jun 2006 14:16:30 +0200 From: Max Laier Organization: FreeBSD To: Maxim Konovalov Date: Tue, 27 Jun 2006 14:16:20 +0200 User-Agent: KMail/1.9.1 References: <200605141422.k4EEMnmC056704@repoman.freebsd.org> <20060627015411.B30917@mp2.macomnet.net> In-Reply-To: <20060627015411.B30917@mp2.macomnet.net> X-Face: ,,8R(x[kmU]tKN@>gtH1yQE4aslGdu+2]; R]*pL,U>^H?)gW@49@wdJ`H<=?utf-8?q?=25=7D*=5FBD=0A=09U=5For=3D=5CmOZf764=26nYj=3DJYbR1PW0ud?=>|!~,,CPC.1-D$FG@0h3#'5"k{V]a~.<=?utf-8?q?mZ=7D44=23Se=7Em=0A=09Fe=7E=5C=5DX5B=5D=5Fxj?=(ykz9QKMw_l0C2AQ]}Ym8)fU MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1475526.6XgAx0F7cA"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200606271416.29255.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: dsh@vlink.ru, cvs-src@freebsd.org, src-committers@freebsd.org, Bruce M Simpson , cvs-all@freebsd.org Subject: Re: cvs commit: src/sys/netinet in.h ip_output.c ip_var.h X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 27 Jun 2006 12:16:45 -0000 --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 > 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--