• Patrick McHardy's avatar
    netfilter: nf_nat: add support for persistent mappings · 98d500d6
    Patrick McHardy authored
    The removal of the SAME target accidentally removed one feature that is
    not available from the normal NAT targets so far, having multi-range
    mappings that use the same mapping for each connection from a single
    client. The current behaviour is to choose the address from the range
    based on source and destination IP, which breaks when communicating
    with sites having multiple addresses that require all connections to
    originate from the same IP address.
    Introduce a IP_NAT_RANGE_PERSISTENT option that controls whether the
    destination address is taken into account for selecting addresses.
    Signed-off-by: default avatarPatrick McHardy <kaber@trash.net>