From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751753AbdHBVx5 (ORCPT ); Wed, 2 Aug 2017 17:53:57 -0400 Received: from mx2.suse.de ([195.135.220.15]:47379 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750850AbdHBVx4 (ORCPT ); Wed, 2 Aug 2017 17:53:56 -0400 Date: Wed, 2 Aug 2017 23:53:54 +0200 From: "Luis R. Rodriguez" To: Cong Wang Cc: Massimo Sala , "Luis R. Rodriguez" , Kees Cook , LKML , Linux Kernel Network Developers Subject: Re: sysctl, argument parsing, possible bug Message-ID: <20170802215354.GN18884@wotan.suse.de> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.6.0 (2016-04-01) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, Aug 01, 2017 at 02:54:51PM -0700, Cong Wang wrote: > On Tue, Aug 1, 2017 at 2:34 PM, Massimo Sala wrote: > > Do you confirm it is a sysctl parsing bug ? > > > > Bosybox handles these cases, so I think also standalone sysctl have to. > > > > Or at least someone must update sysctl docs / MAN about this. > > > > Maybe, sysctl seems (I never look into it) just to interpret dot as > a separator, unless it reads from the /proc/sys/ directory, it can > not know eth0.100 is actually a netdev name. Using echo or sysctl -w works for me, try upgrading your procps, I have procps-3.3.12. Busybox sysctl fails though, so it would seems this is an issue with busybox, go fix that. With procps-3.3.12.: Setting: ergon:~ # cat /proc/sys/net/ipv4/conf/eth0.100/forwarding 1 ergon:~ # sysctl -w net.ipv4.conf.eth0/100.forwarding=0 net.ipv4.conf.eth0/100.forwarding = 0 ergon:~ # cat /proc/sys/net/ipv4/conf/eth0.100/forwarding 0 Querying: ergon:~ # sysctl net.ipv4.conf.eth0/100.forwarding net.ipv4.conf.eth0/100.forwarding = 0 With busybox: ergon:~ # busybox-static sysctl net.ipv4.conf.eth0/100.forwarding sysctl: error: 'net.ipv4.conf.eth0.100.forwarding' is an unknown key Luis