]> git.baikalelectronics.ru Git - kernel.git/commit
netfilter: xt_multiport: Fix wrong unmatch result with multiple ports
authorGao Feng <fgao@ikuai8.com>
Fri, 25 Nov 2016 04:32:07 +0000 (12:32 +0800)
committerPablo Neira Ayuso <pablo@netfilter.org>
Tue, 6 Dec 2016 20:48:20 +0000 (21:48 +0100)
commit16d868eeef3e1dbd617f785e824691162618dd28
treec8a5bbd7e7119877fc54d141b02db9b0c5533db1
parent608136091da168d6b676513b7d428b5a1f14517c
netfilter: xt_multiport: Fix wrong unmatch result with multiple ports

I lost one test case in the last commit for xt_multiport.
For example, the rule is "-m multiport --dports 22,80,443".
When first port is unmatched and the second is matched, the curent codes
could not return the right result.
It would return false directly when the first port is unmatched.

Fixes: e5de98e0d54d ("netfilter: xt_multiport: Use switch case instead
of multiple condition checks")
Signed-off-by: Gao Feng <fgao@ikuai8.com>
Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
net/netfilter/xt_multiport.c