]> granicus.if.org Git - procps-ng/commit
sysctl: fix argument parsing regression
authorJim Warner <james.warner@comcast.net>
Wed, 7 Mar 2012 11:49:09 +0000 (12:49 +0100)
committerCraig Small <csmall@enc.com.au>
Wed, 7 Mar 2012 21:40:02 +0000 (08:40 +1100)
commit18c08390da033a44f977e44a32be079d85bf1ef9
tree9135e144b846b2a473bdb5a95279c858ef60df37
parent87bb21b55792cb2d92bb89ae0c22e9c6b8097e5d
sysctl: fix argument parsing regression

Any key=value pair following the first one are dropped after
commit 81df8e26300b35968e3702decc02e9413d5389fc, due to changing
from the while loop to using getopt.

Broken behavior:
  sysctl net.ipv6.conf.tun0.optimistic_dad net.ipv6.conf.tun0.mc_forwarding
  net.ipv6.conf.tun0.optimistic_dad = 0

Good behavior:
  sysctl net.ipv6.conf.tun0.optimistic_dad net.ipv6.conf.tun0.mc_forwarding
  net.ipv6.conf.tun0.optimistic_dad = 0
  net.ipv6.conf.tun0.mc_forwarding = 0

Reference: http://www.freelists.org/post/procps/BUG-Commit-81df8e2-allows-only-one-keyvalue-arg
Reported-By: Sven Ulland <sveniu@opera.com>
Signed-off-by: Jim Warner <james.warner@comcast.net>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
sysctl.c