Skip to content

Commit be7be6e

Browse files
Florian Westphalummakynes
authored andcommitted
netfilter: ipvs: fix incorrect conflict resolution
The commit ab8bc7e ("netfilter: remove nf_ct_is_untracked") changed the line if (ct && !nf_ct_is_untracked(ct) && nfct_nat(ct)) { to if (ct && nfct_nat(ct)) { meanwhile, the commit 4139089 ("netfilter: ipvs: don't check for presence of nat extension") from ipvs-next had changed the same line to if (ct && !nf_ct_is_untracked(ct) && (ct->status & IPS_NAT_MASK)) { When ipvs-next got merged into nf-next, the merge resolution took the first version, dropping the conversion of nfct_nat(). While this doesn't cause a problem at the moment, it will once we stop adding the nat extension by default. Signed-off-by: Florian Westphal <fw@strlen.de> Signed-off-by: Pablo Neira Ayuso <pablo@netfilter.org>
1 parent 01026ed commit be7be6e

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

net/netfilter/ipvs/ip_vs_ftp.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -260,8 +260,9 @@ static int ip_vs_ftp_out(struct ip_vs_app *app, struct ip_vs_conn *cp,
260260
buf_len = strlen(buf);
261261

262262
ct = nf_ct_get(skb, &ctinfo);
263-
if (ct && nfct_nat(ct)) {
263+
if (ct && (ct->status & IPS_NAT_MASK)) {
264264
bool mangled;
265+
265266
/* If mangling fails this function will return 0
266267
* which will cause the packet to be dropped.
267268
* Mangling can only fail under memory pressure,

0 commit comments

Comments
 (0)