diff options
author | Pavel Tikhomirov <ptikhomirov@virtuozzo.com> | 2016-07-01 16:53:54 +0300 |
---|---|---|
committer | Pablo Neira Ayuso <pablo@netfilter.org> | 2016-07-05 14:57:57 +0200 |
commit | c6ac37d8d8843fb1fdc34e4a2a41a4f027ab670c (patch) | |
tree | 6c2fc97172f0b3d38ff59f2a06942bc6f0dc00c9 /include/dt-bindings/spmi | |
parent | c37a2dfa67f7920b14ea77dc9f9f9660f7a1f6dd (diff) | |
download | op-kernel-dev-c6ac37d8d8843fb1fdc34e4a2a41a4f027ab670c.zip op-kernel-dev-c6ac37d8d8843fb1fdc34e4a2a41a4f027ab670c.tar.gz |
netfilter: nf_log: fix error on write NONE to logger choice sysctl
It is hard to unbind nf-logger:
echo NONE > /proc/sys/net/netfilter/nf_log/0
bash: echo: write error: No such file or directory
sysctl -w net.netfilter.nf_log.0=NONE
sysctl: setting key "net.netfilter.nf_log.0": No such file or directory
net.netfilter.nf_log.0 = NONE
You need explicitly send '\0', for instance like:
echo -e "NONE\0" > /proc/sys/net/netfilter/nf_log/0
That seem to be strange, so fix it using proc_dostring.
Now it works fine:
modprobe nfnetlink_log
echo nfnetlink_log > /proc/sys/net/netfilter/nf_log/0
cat /proc/sys/net/netfilter/nf_log/0
nfnetlink_log
echo NONE > /proc/sys/net/netfilter/nf_log/0
cat /proc/sys/net/netfilter/nf_log/0
NONE
v2: add missed error check for proc_dostring
Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
Diffstat (limited to 'include/dt-bindings/spmi')
0 files changed, 0 insertions, 0 deletions