Re: Logic for SNAT persistent handling introduced in 2.6.30 is inverted

From: Patrick McHardy
Date: Mon Aug 24 2009 - 13:28:47 EST


Maximilian Engelhardt wrote:
> Kernel 2.6.30 introduced a patch [1] for the persistent option in the
> netfilter SNAT target. This is exactly what we need here so I had a quick look
> at the code and noticed that the patch is wrong. The logic is simply inverted.
> The patch below fixes this.

Good catch, applied. I'm wondering what the people who requested and
tested this change did actually test :)

> Also note that because of this the default behavior of the SNAT target has
> changed since kernel 2.6.30 as it now ignores the destination IP in choosing
> the source IP for nating (which should only be the case if the persistent
> option is set).

It fortunately only affects NAT to a range of IPs, which isn't
used that much.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/