From: "Luis R. Rodriguez" <mcgrof@kernel.org>
To: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Massimo Sala <massimo.sala.71@gmail.com>,
"Luis R. Rodriguez" <mcgrof@kernel.org>,
Kees Cook <keescook@chromium.org>,
LKML <linux-kernel@vger.kernel.org>,
Linux Kernel Network Developers <netdev@vger.kernel.org>
Subject: Re: sysctl, argument parsing, possible bug
Date: Wed, 2 Aug 2017 23:53:54 +0200 [thread overview]
Message-ID: <20170802215354.GN18884@wotan.suse.de> (raw)
In-Reply-To: <CAM_iQpV8rJOxvA+hT4Dfs_+sJv5N9ZVv5DCgYDxjpvr2X124ww@mail.gmail.com>
On Tue, Aug 01, 2017 at 02:54:51PM -0700, Cong Wang wrote:
> On Tue, Aug 1, 2017 at 2:34 PM, Massimo Sala <massimo.sala.71@gmail.com> 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
next prev parent reply other threads:[~2017-08-02 21:53 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-08-01 20:47 Massimo Sala
2017-08-01 21:27 ` Cong Wang
2017-08-01 21:34 ` Massimo Sala
2017-08-01 21:54 ` Cong Wang
2017-08-02 21:53 ` Luis R. Rodriguez [this message]
2017-08-02 2:40 ` Stephen Hemminger
2017-08-08 18:26 Massimo Sala
2017-08-08 19:04 ` Stephen Hemminger
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170802215354.GN18884@wotan.suse.de \
--to=mcgrof@kernel.org \
--cc=keescook@chromium.org \
--cc=linux-kernel@vger.kernel.org \
--cc=massimo.sala.71@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=xiyou.wangcong@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®