20 Feb, 2006

2 commits

  • When redirecting an outgoing packet to loopback, it keeps the original
    conntrack reference and information from the outgoing path, which
    falsely triggers the check for DNAT on input and the dst_entry is
    released to trigger rerouting. ip_route_input refuses to route the
    packet because it has a local source address and it is dropped.

    Look at the packet itself to dermine if it was NATed. Also fix a
    missing inversion that causes unneccesary xfrm lookups.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     
  • ICMP errors are only SNATed when their source matches the source of the
    connection they are related to, otherwise the source address is not
    changed. This creates problems with ICMP frag. required messages
    originating from a router behind the NAT, if private IPs are used the
    packet has a good change of getting dropped on the path to its destination.

    Always NAT ICMP errors similar to the original connection.

    Based on report by Al Viro.

    Signed-off-by: Patrick McHardy
    Signed-off-by: David S. Miller

    Patrick McHardy
     

16 Feb, 2006

1 commit


15 Feb, 2006

1 commit

  • To find out if a packet needs to be handled by IPsec after SNAT, packets
    are currently rerouted in POST_ROUTING and a new xfrm lookup is done. This
    breaks SNAT of non-unicast packets to non-local addresses because the
    packet is routed as incoming packet and no neighbour entry is bound to the
    dst_entry. In general, it seems to be a bad idea to replace the dst_entry
    after the packet was already sent to the output routine because its state
    might not match what's expected.

    This patch changes the xfrm lookup in POST_ROUTING to re-use the original
    dst_entry without routing the packet again. This means no policy routing
    can be used for transport mode transforms (which keep the original route)
    when packets are SNATed to match the policy, but it looks like the best
    we can do for now.

    Signed-off-by: Patrick McHardy
    Signed-off-by: Herbert Xu
    Signed-off-by: David S. Miller

    Patrick McHardy
     

05 Feb, 2006

9 commits


17 Jan, 2006

3 commits


13 Jan, 2006

1 commit

  • This monster-patch tries to do the best job for unifying the data
    structures and backend interfaces for the three evil clones ip_tables,
    ip6_tables and arp_tables. In an ideal world we would never have
    allowed this kind of copy+paste programming... but well, our world
    isn't (yet?) ideal.

    o introduce a new x_tables module
    o {ip,arp,ip6}_tables depend on this x_tables module
    o registration functions for tables, matches and targets are only
    wrappers around x_tables provided functions
    o all matches/targets that are used from ip_tables and ip6_tables
    are now implemented as xt_FOOBAR.c files and provide module aliases
    to ipt_FOOBAR and ip6t_FOOBAR
    o header files for xt_matches are in include/linux/netfilter/,
    include/linux/netfilter_{ipv4,ipv6} contains compatibility wrappers
    around the xt_FOOBAR.h headers

    Based on this patchset we're going to further unify the code,
    gradually getting rid of all the layer 3 specific assumptions.

    Signed-off-by: Harald Welte
    Signed-off-by: David S. Miller

    Harald Welte
     

12 Jan, 2006

2 commits


11 Jan, 2006

7 commits


10 Jan, 2006

1 commit


08 Jan, 2006

5 commits


07 Jan, 2006

3 commits


06 Jan, 2006

5 commits