net: bpfilter: fix iptables failure if bpfilter_umh is disabled
authorTaehee Yoo <ap420073@gmail.com>
Mon, 5 Nov 2018 13:31:41 +0000 (22:31 +0900)
committerDavid S. Miller <davem@davemloft.net>
Tue, 6 Nov 2018 01:12:18 +0000 (17:12 -0800)
commit97adaddaa6db7a8af81b9b11e30cbe3628cd6700
tree416f1193370a86bc0e4fe45f8cd16b650ee8bf82
parentc34c1287778b080ed692c0a46a8e345206cc29e6
net: bpfilter: fix iptables failure if bpfilter_umh is disabled

When iptables command is executed, ip_{set/get}sockopt() try to upload
bpfilter.ko if bpfilter is enabled. if it couldn't find bpfilter.ko,
command is failed.
bpfilter.ko is generated if CONFIG_BPFILTER_UMH is enabled.
ip_{set/get}sockopt() only checks CONFIG_BPFILTER.
So that if CONFIG_BPFILTER is enabled and CONFIG_BPFILTER_UMH is disabled,
iptables command is always failed.

test config:
   CONFIG_BPFILTER=y
   # CONFIG_BPFILTER_UMH is not set

test command:
   %iptables -L
   iptables: No chain/target/match by that name.

Fixes: d2ba09c17a06 ("net: add skeleton of bpfilter kernel module")
Signed-off-by: Taehee Yoo <ap420073@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_sockglue.c