]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commit
net: sched: em_ipt: keep the user-specified nfproto and dump it
authorNikolay Aleksandrov <nikolay@cumulusnetworks.com>
Thu, 27 Jun 2019 08:10:46 +0000 (11:10 +0300)
committerDavid S. Miller <davem@davemloft.net>
Sat, 29 Jun 2019 18:15:12 +0000 (11:15 -0700)
commitba3d24d48ffd6c787a1c745784484dc3c2f16119
tree3c707bc81379aeedfa0268a52a86589c9ba4f9ee
parentf4c1c40c353fe602e12192d522b2358947da83bb
net: sched: em_ipt: keep the user-specified nfproto and dump it

If we dump NFPROTO_UNSPEC as nfproto user-space libxtables can't handle
it and would exit with an error like:
"libxtables: unhandled NFPROTO in xtables_set_nfproto"
In order to avoid the error return the user-specified nfproto. If we
don't record it then the match family is used which can be
NFPROTO_UNSPEC. Even if we add support to mask NFPROTO_UNSPEC in
iproute2 we have to be compatible with older versions which would be
also be allowed to add NFPROTO_UNSPEC matches (e.g. addrtype after the
last patch).

v3: don't use the user nfproto for matching, only for dumping the rule,
    also don't allow the nfproto to be unspecified (explained above)
v2: adjust changes to missing patch, was patch 04 in v1

Signed-off-by: Nikolay Aleksandrov <nikolay@cumulusnetworks.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/sched/em_ipt.c