]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register
authorGao Feng <fgao@ikuai8.com>
Sat, 25 Mar 2017 10:24:36 +0000 (18:24 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Mon, 27 Mar 2017 11:49:13 +0000 (13:49 +0200)
commit75c689dca98851d65ef5a27e5ce26b625b68751c
treee93cd06368bf1578dcc850815b2a2af9bd26ee6b
parent9c3f3794926a997b1cab6c42480ff300efa2d162
netfilter: nf_nat_snmp: Fix panic when snmp_trap_helper fails to register

In the commit 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp
helper"), the snmp_helper is replaced by nf_nat_snmp_hook. So the
snmp_helper is never registered. But it still tries to unregister the
snmp_helper, it could cause the panic.

Now remove the useless snmp_helper and the unregister call in the
error handler.

Fixes: 93557f53e1fb ("netfilter: nf_conntrack: nf_conntrack snmp helper")
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/ipv4/netfilter/nf_nat_snmp_basic.c