From owner-freebsd-net@FreeBSD.ORG Tue Aug 16 14:17:55 2005 Return-Path: X-Original-To: freebsd-net@freebsd.org Delivered-To: freebsd-net@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9BBAA16A41F for ; Tue, 16 Aug 2005 14:17:55 +0000 (GMT) (envelope-from max@love2party.net) Received: from moutng.kundenserver.de (moutng.kundenserver.de [212.227.126.177]) by mx1.FreeBSD.org (Postfix) with ESMTP id D01D443D49 for ; Tue, 16 Aug 2005 14:17:54 +0000 (GMT) (envelope-from max@love2party.net) Received: from p54A3EB83.dip.t-dialin.net [84.163.235.131] (helo=donor.laier.local) by mrelayeu.kundenserver.de with ESMTP (Nemesis), id 0MKxQS-1E52G70EFr-0005e1; Tue, 16 Aug 2005 16:17:43 +0200 From: Max Laier To: freebsd-net@freebsd.org Date: Tue, 16 Aug 2005 16:17:50 +0200 User-Agent: KMail/1.8.2 References: <4301499E.8040704@ntmk.ru> In-Reply-To: <4301499E.8040704@ntmk.ru> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart1762813.IeyQ2jLzbZ"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200508161618.02485.max@love2party.net> X-Provags-ID: kundenserver.de abuse@kundenserver.de login:61c499deaeeba3ba5be80f48ecc83056 Cc: Boris Kovalenko Subject: Re: PR bin/82306 X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 16 Aug 2005 14:17:55 -0000 --nextPart1762813.IeyQ2jLzbZ Content-Type: multipart/mixed; boundary="Boundary-01=_VWfADM86mhQ4UA0" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_VWfADM86mhQ4UA0 Content-Type: text/plain; charset="koi8-r" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tuesday 16 August 2005 04:04, Boris Kovalenko wrote: > Hello! > > Is there news on PR 82306? Will it be fixed at least with 5.5R? In case anybody is watching here ... please try the attached diff. =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=_VWfADM86mhQ4UA0 Content-Type: text/x-diff; charset="koi8-r"; name="in.c.diff" Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename="in.c.diff" Index: in.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/in.c,v retrieving revision 1.85 diff -u -r1.85 in.c =2D-- in.c 2 Jun 2005 00:04:08 -0000 1.85 +++ in.c 16 Aug 2005 13:41:08 -0000 @@ -67,6 +67,10 @@ static int subnetsarelocal =3D 0; SYSCTL_INT(_net_inet_ip, OID_AUTO, subnets_are_local, CTLFLAG_RW, &subnetsarelocal, 0, "Treat all subnets as directly connected"); +static int sameprefixcarponly =3D 0; +SYSCTL_INT(_net_inet_ip, OID_AUTO, same_prefix_carp_only, CTLFLAG_RW, + &sameprefixcarponly, 0, + "Refuse to create same prefixes on different interfaces"); =20 struct in_multihead in_multihead; /* XXX BSS initialization */ =20 @@ -815,8 +819,15 @@ * If we got a matching prefix route inserted by other * interface address, we are done here. */ =2D if (ia->ia_flags & IFA_ROUTE) =2D return 0; + if (ia->ia_flags & IFA_ROUTE) { + if (sameprefixcarponly && + target->ia_ifp->if_type !=3D IFT_CARP && + ia->ia_ifp->if_type !=3D IFT_CARP) + return (0); + else + return (EEXIST); + } else + continue; } =20 /* --Boundary-01=_VWfADM86mhQ4UA0-- --nextPart1762813.IeyQ2jLzbZ Content-Type: application/pgp-signature -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.2 (FreeBSD) iD8DBQBDAfWaXyyEoT62BG0RAq+PAJ4lSfF0TtCh91GYiEa50VDPR43SQQCfRbsK V/70C920KsW8M3aOTU/L7IE= =YrtF -----END PGP SIGNATURE----- --nextPart1762813.IeyQ2jLzbZ--