From owner-svn-src-head@FreeBSD.ORG Mon Jan 12 14:39:13 2015 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2F93C7E5; Mon, 12 Jan 2015 14:39:13 +0000 (UTC) Received: from cell.glebius.int.ru (glebius.int.ru [81.19.69.10]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "cell.glebius.int.ru", Issuer "cell.glebius.int.ru" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id A4E6763F; Mon, 12 Jan 2015 14:39:12 +0000 (UTC) Received: from cell.glebius.int.ru (localhost [127.0.0.1]) by cell.glebius.int.ru (8.14.9/8.14.9) with ESMTP id t0CEdAUH020058 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) Received: (from glebius@localhost) by cell.glebius.int.ru (8.14.9/8.14.9/Submit) id t0CEdAwO020057; Mon, 12 Jan 2015 17:39:10 +0300 (MSK) (envelope-from glebius@FreeBSD.org) X-Authentication-Warning: cell.glebius.int.ru: glebius set sender to glebius@FreeBSD.org using -f Date: Mon, 12 Jan 2015 17:39:10 +0300 From: Gleb Smirnoff To: Luiz Otavio O Souza Subject: Re: svn commit: r276751 - head/sys/netinet Message-ID: <20150112143910.GL15484@FreeBSD.org> References: <201501061307.t06D7E0a001358@svn.freebsd.org> <20150107205203.GI15484@FreeBSD.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.23 (2014-03-12) Cc: Luiz Otavio O Souza , svn-src-head@freebsd.org, svn-src-all@freebsd.org, src-committers@freebsd.org X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Jan 2015 14:39:13 -0000 Luiz, On Fri, Jan 09, 2015 at 11:14:53AM -0200, Luiz Otavio O Souza wrote: L> On Wed, Jan 7, 2015 at 6:52 PM, Gleb Smirnoff wrote: L> > On Tue, Jan 06, 2015 at 01:07:14PM +0000, Luiz Otavio O Souza wrote: L> > L> Author: loos L> > L> Date: Tue Jan 6 13:07:13 2015 L> > L> New Revision: 276751 L> > L> URL: https://svnweb.freebsd.org/changeset/base/276751 L> > L> L> > L> Log: L> > L> Remove the check that prevent carp(4) advskew to be set to '0'. L> > L> L> > L> CARP devices are created with advskew set to '0' and once you set it to L> > L> any other value in the valid range (0..254) you can't set it back to zero. L> > L> L> > L> The code in question is also used to prevent that zeroed values overwrite L> > L> the CARP defaults when a new CARP device is created. Since advskew already L> > L> defaults to '0' for newly created devices and the new value is guaranteed L> > L> to be within the valid range, it is safe to overwrite it here. L> > L> L> > L> PR: 194672 L> > L> Reported by: cmb@pfsense.org L> > L> In collaboration with: garga L> > L> Tested by: garga L> > L> MFC after: 2 weeks L> > L> > Please correct me if I am wrong, but after this change any SIOCSVH will reset L> > the advskew to 0. L> > L> > For example, please try to: L> > L> > ifconfig igb0 vhid 1 advskew 100 L> > ifconfig igb0 vhid 1 pass foobar L> > L> > Now let's check the advskew: L> > L> > ifconfig igb0 L> L> Only if the SIOCSVH request is not initialized with data from SIOCGVH. L> L> ifconfig (at setcarp_callback()) will always read the existing values L> before issuing the SIOCSVH with the new values and this is what makes L> my change safe: L> L> # ifconfig em0 vhid 1 advskew 100 192.168.100.1/24 alias L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 pass foobar L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 1 advskew 100 L> # ifconfig em0 vhid 1 advbase 5 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 100 L> # ifconfig em0 vhid 1 advskew 0 L> # ifconfig em0 | grep carp L> carp: MASTER vhid 1 advbase 5 advskew 0 Thanks for checking that! Good that I was wrong. -- Totus tuus, Glebius.