From owner-freebsd-hackers@FreeBSD.ORG Thu Dec 1 15:06:28 2011 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 3E7A61065677 for ; Thu, 1 Dec 2011 15:06:28 +0000 (UTC) (envelope-from jhb@freebsd.org) Received: from cyrus.watson.org (cyrus.watson.org [65.122.17.42]) by mx1.freebsd.org (Postfix) with ESMTP id 165338FC12 for ; Thu, 1 Dec 2011 15:06:28 +0000 (UTC) Received: from bigwig.baldwin.cx (bigwig.baldwin.cx [96.47.65.170]) by cyrus.watson.org (Postfix) with ESMTPSA id BF4FB46B0A; Thu, 1 Dec 2011 10:06:27 -0500 (EST) Received: from jhbbsd.localnet (unknown [209.249.190.124]) by bigwig.baldwin.cx (Postfix) with ESMTPSA id 51268B914; Thu, 1 Dec 2011 10:06:27 -0500 (EST) From: John Baldwin To: Jason Hellenthal Date: Thu, 1 Dec 2011 10:06:26 -0500 User-Agent: KMail/1.13.5 (FreeBSD/8.2-CBSD-20110714-p8; KDE/4.5.5; amd64; ; ) References: <20111125073630.GC7915@DataIX.net> <201111301152.47002.jhb@freebsd.org> <20111130184815.GA70174@DataIX.net> In-Reply-To: <20111130184815.GA70174@DataIX.net> MIME-Version: 1.0 Content-Type: Text/Plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Message-Id: <201112011006.26833.jhb@freebsd.org> X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.2.7 (bigwig.baldwin.cx); Thu, 01 Dec 2011 10:06:27 -0500 (EST) Cc: freebsd-hackers@freebsd.org Subject: Re: sysctl description spillover and also setting the sysctl ? X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 01 Dec 2011 15:06:28 -0000 On Wednesday, November 30, 2011 1:48:15 pm Jason Hellenthal wrote: > > On Wed, Nov 30, 2011 at 11:52:46AM -0500, John Baldwin wrote: > > On Friday, November 25, 2011 2:36:30 am Jason Hellenthal wrote: > > > > > > Found a troubling result of the following and figured someone might want to > > take a look. > > > > > > Pay close attention to the output and behavior. > > > > > > sysctl net.inet.udp.blackhole=0 > > > sysctl net.inet.udp.blackhole > > > sysctl -d net.inet.udp.blackhole=1 > > > sysctl net.inet.udp.blackhole > > > > > > > > > Is this expected ? should it not just display the description instead of > > adjusting ? as well not display the description like it is adjusting the > > description too ? > > > > Hah, cute. It should probably fail with an error if you do something like > > that, yes. > > > > Yeah thats what I thought about it to but the more I thought about it, if > it just displayed the values changing instead of the description when =N > is supplied I think that would be acceptable to. 0 -> 1 in this case. Or > possibly sys.oid: 0 -> 1 # since sysctl.conf(5) also takes > comments like that. > > Not really thats something at the top of the list for fixes though. Low > fruit. Food for thought. I think it's simplest to just make -d force descriptions only and ignore settings. I've committed a one-line fix to sysctl(8) for that. -- John Baldwin