Re: [PATCH] netfilter: ctnetlink: Resolve conntrack L3-protocol flush regression

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Please, keep in CC all involved people.

Le 03/05/2019 à 17:40, Kristian Evensen a écrit :
> Commit 59c08c69c278 ("netfilter: ctnetlink: Support L3 protocol-filter
> on flush") introduced a user-space regression when flushing connection
> track entries. Before this commit, the nfgen_family field was not used
> by the kernel and all entries were removed. Since this commit,
> nfgen_family is used to filter out entries that should not be removed.
> One example a broken tool is conntrack. conntrack always sets
> nfgen_family to AF_INET, so after 59c08c69c278 only IPv4 entries were
> removed with the -F parameter.
> 
> Pablo Neira Ayuso suggested using nfgenmsg->version to resolve the
> regression, and this commit implements his suggestion. nfgenmsg->version
> is so far set to zero, so it is well-suited to be used as a flag for
> selecting old or new flush behavior. If version is 0, nfgen_family is
> ignored and all entries are used. If user-space sets the version to one
> (or any other value than 0), then the new behavior is used. As version
> only can have two valid values, I chose not to add a new
> NFNETLINK_VERSION-constant.
> 
> Fixes: 59c08c69c278 ("netfilter: ctnetlink: Support L3 protocol-filter
> on flush")
> 
Please, don't break the fixes line and don't separate it from other tags with an
empty line.

> Reported-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>
> Suggested-by: Pablo Neira Ayuso <pablo@xxxxxxxxxxxxx>
> Signed-off-by: Kristian Evensen <kristian.evensen@xxxxxxxxx>
Tested-by: Nicolas Dichtel <nicolas.dichtel@xxxxxxxxx>



[Index of Archives]     [Netfitler Users]     [Berkeley Packet Filter]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux