]> git.ipfire.org Git - thirdparty/ipset.git/commit
ip_set: Pass init_net when @net is missing in match check params data structure
authorSerhey Popovych <serhe.popovych@gmail.com>
Fri, 29 Nov 2019 09:21:34 +0000 (11:21 +0200)
committerJozsef Kadlecsik <kadlec@netfilter.org>
Mon, 9 Dec 2019 10:17:41 +0000 (11:17 +0100)
commit5743b3b545fc3b48c53fe3d763fa7ec738af27bf
tree12503fde3b1d34f8e6a0411cdfefb90561b60ae1
parent55b1b5093c6bb1c0330699cdfdd1f6a8254eead7
ip_set: Pass init_net when @net is missing in match check params data structure

It is better to restrict ipsets to default network namespace on old
kernels that does not contain @net parameter in @struct xt_mtchk_param
(i.e. ones prior to commit a83d8e8d099f ("netfilter: xtables:
add struct xt_mtchk_param::net"), tag v2.6.34) instead of panicing
on them.

Found and tested on RHEL 6 with 2.6.32 kernels.

Fixes: 90e279db0cf5 ("Add more compatibility checkings to support older kernel releases")
Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Jozsef Kadlecsik <kadlec@netfilter.org>
kernel/net/netfilter/xt_set.c