Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1701458 > unrolled thread
| Started by | Massimo Sala <massimo.sala.71@gmail.com> |
|---|---|
| First post | 2017-08-01 22:50 +0200 |
| Last post | 2017-08-02 04:50 +0200 |
| Articles | 6 — 4 participants |
Back to article view | Back to linux.kernel
sysctl, argument parsing, possible bug Massimo Sala <massimo.sala.71@gmail.com> - 2017-08-01 22:50 +0200
Re: sysctl, argument parsing, possible bug Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-01 23:30 +0200
Re: sysctl, argument parsing, possible bug Massimo Sala <massimo.sala.71@gmail.com> - 2017-08-01 23:40 +0200
Re: sysctl, argument parsing, possible bug Cong Wang <xiyou.wangcong@gmail.com> - 2017-08-02 00:00 +0200
Re: sysctl, argument parsing, possible bug "Luis R. Rodriguez" <mcgrof@kernel.org> - 2017-08-03 00:00 +0200
Re: sysctl, argument parsing, possible bug Stephen Hemminger <stephen@networkplumber.org> - 2017-08-02 04:50 +0200
| From | Massimo Sala <massimo.sala.71@gmail.com> |
|---|---|
| Date | 2017-08-01 22:50 +0200 |
| Subject | sysctl, argument parsing, possible bug |
| Message-ID | <u9Mh4-jv-15@gated-at.bofh.it> |
cat /proc/sys/net/ipv4/conf/eth0.100/forwarding 0 sysctl net.ipv4.conf.eth0.100.forwarding error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key uname -a Linux ip-172-31-45-203 4.9.38-16.33.amzn1.x86_64 #1 SMP Thu Jul 20 01:31:29 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux cat /etc/issue Amazon Linux AMI release 2017.03 best regards, Sala
[toc] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-08-01 23:30 +0200 |
| Message-ID | <u9MTL-Oh-7@gated-at.bofh.it> |
| In reply to | #1701458 |
On Tue, Aug 1, 2017 at 1:47 PM, Massimo Sala <massimo.sala.71@gmail.com> wrote: > cat /proc/sys/net/ipv4/conf/eth0.100/forwarding > 0 > > sysctl net.ipv4.conf.eth0.100.forwarding > error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key > Use echo instead, sysctl doesn't understand eth0.100 is a netdev name, sigh.
[toc] | [prev] | [next] | [standalone]
| From | Massimo Sala <massimo.sala.71@gmail.com> |
|---|---|
| Date | 2017-08-01 23:40 +0200 |
| Message-ID | <u9N3r-Rr-1@gated-at.bofh.it> |
| In reply to | #1701516 |
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. Best regards, Sala On 01/08/2017, Cong Wang <xiyou.wangcong@gmail.com> wrote: > On Tue, Aug 1, 2017 at 1:47 PM, Massimo Sala <massimo.sala.71@gmail.com> > wrote: >> cat /proc/sys/net/ipv4/conf/eth0.100/forwarding >> 0 >> >> sysctl net.ipv4.conf.eth0.100.forwarding >> error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key >> > > Use echo instead, sysctl doesn't understand eth0.100 > is a netdev name, sigh. >
[toc] | [prev] | [next] | [standalone]
| From | Cong Wang <xiyou.wangcong@gmail.com> |
|---|---|
| Date | 2017-08-02 00:00 +0200 |
| Message-ID | <u9NmN-ZP-3@gated-at.bofh.it> |
| In reply to | #1701519 |
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.
[toc] | [prev] | [next] | [standalone]
| From | "Luis R. Rodriguez" <mcgrof@kernel.org> |
|---|---|
| Date | 2017-08-03 00:00 +0200 |
| Message-ID | <ua9Qm-7en-23@gated-at.bofh.it> |
| In reply to | #1701534 |
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
[toc] | [prev] | [next] | [standalone]
| From | Stephen Hemminger <stephen@networkplumber.org> |
|---|---|
| Date | 2017-08-02 04:50 +0200 |
| Message-ID | <u9RTr-3Xy-1@gated-at.bofh.it> |
| In reply to | #1701516 |
On Tue, 1 Aug 2017 14:27:37 -0700
Cong Wang <xiyou.wangcong@gmail.com> wrote:
> On Tue, Aug 1, 2017 at 1:47 PM, Massimo Sala <massimo.sala.71@gmail.com> wrote:
> > cat /proc/sys/net/ipv4/conf/eth0.100/forwarding
> > 0
> >
> > sysctl net.ipv4.conf.eth0.100.forwarding
> > error: "net.ipv4.conf.eth0.100.forwarding" is an unknown key
> >
>
> Use echo instead, sysctl doesn't understand eth0.100
> is a netdev name, sigh.
sysctl happily accepts / as a separator see man sysctl(8)
PARAMETERS
variable
The name of a key to read from. An example is kernel.ostype. The '/' separator is also
accepted in place of a '.'.
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web