You need to sign in or sign up before continuing.
  1. 08 10月, 2008 2 次提交
  2. 07 10月, 2008 1 次提交
  3. 01 10月, 2008 9 次提交
    • K
      udp: Export UDP socket lookup function · bcd41303
      KOVACS Krisztian 提交于
      The iptables tproxy code has to be able to do UDP socket hash lookups,
      so we have to provide an exported lookup function for this purpose.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      bcd41303
    • K
      tcp: Port redirection support for TCP · a3116ac5
      KOVACS Krisztian 提交于
      Current TCP code relies on the local port of the listening socket
      being the same as the destination address of the incoming
      connection. Port redirection used by many transparent proxying
      techniques obviously breaks this, so we have to store the original
      destination port address.
      
      This patch extends struct inet_request_sock and stores the incoming
      destination port value there. It also modifies the handshake code to
      use that value as the source port when sending reply packets.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a3116ac5
    • K
      ipv4: Make Netfilter's ip_route_me_harder() non-local address compatible · 86b08d86
      KOVACS Krisztian 提交于
      Netfilter's ip_route_me_harder() tries to re-route packets either
      generated or re-routed by Netfilter. This patch changes
      ip_route_me_harder() to handle packets from non-locally-bound sockets
      with IP_TRANSPARENT set as local and to set the appropriate flowi
      flags when re-doing the routing lookup.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      86b08d86
    • K
      tcp: Handle TCP SYN+ACK/ACK/RST transparency · 88ef4a5a
      KOVACS Krisztian 提交于
      The TCP stack sends out SYN+ACK/ACK/RST reply packets in response to
      incoming packets. The non-local source address check on output bites
      us again, as replies for transparently redirected traffic won't have a
      chance to leave the node.
      
      This patch selectively sets the FLOWI_FLAG_ANYSRC flag when doing the
      route lookup for those replies. Transparent replies are enabled if the
      listening socket has the transparent socket flag set.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      88ef4a5a
    • K
      ipv4: Make inet_sock.h independent of route.h · 1668e010
      KOVACS Krisztian 提交于
      inet_iif() in inet_sock.h requires route.h. Since users of inet_iif()
      usually require other route.h functionality anyway this patch moves
      inet_iif() to route.h.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1668e010
    • T
      ipv4: Allow binding to non-local addresses if IP_TRANSPARENT is set · b9fb1506
      Tóth László Attila 提交于
      Setting IP_TRANSPARENT is not really useful without allowing non-local
      binds for the socket. To make user-space code simpler we allow these
      binds even if IP_TRANSPARENT is set but IP_FREEBIND is not.
      Signed-off-by: NTóth László Attila <panther@balabit.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b9fb1506
    • K
      ipv4: Implement IP_TRANSPARENT socket option · f5715aea
      KOVACS Krisztian 提交于
      This patch introduces the IP_TRANSPARENT socket option: enabling that
      will make the IPv4 routing omit the non-local source address check on
      output. Setting IP_TRANSPARENT requires NET_ADMIN capability.
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      f5715aea
    • J
      ipv4: Loosen source address check on IPv4 output · a210d01a
      Julian Anastasov 提交于
      ip_route_output() contains a check to make sure that no flows with
      non-local source IP addresses are routed. This obviously makes using
      such addresses impossible.
      
      This patch introduces a flowi flag which makes omitting this check
      possible. The new flag provides a way of handling transparent and
      non-transparent connections differently.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NKOVACS Krisztian <hidden@sch.bme.hu>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      a210d01a
    • V
      tcp: Fix NULL dereference in tcp_4_send_ack() · 4dd7972d
      Vitaliy Gusev 提交于
      Fix NULL dereference in tcp_4_send_ack().
      
      As skb->dev is reset to NULL in tcp_v4_rcv() thus OOPS occurs:
      
      BUG: unable to handle kernel NULL pointer dereference at 00000000000004d0
      IP: [<ffffffff80498503>] tcp_v4_send_ack+0x203/0x250
      
      Stack:  ffff810005dbb000 ffff810015c8acc0 e77b2c6e5f861600 a01610802e90cb6d
       0a08010100000000 88afffff88afffff 0000000080762be8 0000000115c872e8
       0004122000000000 0000000000000001 ffffffff80762b88 0000000000000020
      Call Trace:
       <IRQ>  [<ffffffff80499c33>] tcp_v4_reqsk_send_ack+0x20/0x22
       [<ffffffff8049bce5>] tcp_check_req+0x108/0x14c
       [<ffffffff8047aaf7>] ? rt_intern_hash+0x322/0x33c
       [<ffffffff80499846>] tcp_v4_do_rcv+0x399/0x4ec
       [<ffffffff8045ce4b>] ? skb_checksum+0x4f/0x272
       [<ffffffff80485b74>] ? __inet_lookup_listener+0x14a/0x15c
       [<ffffffff8049babc>] tcp_v4_rcv+0x6a1/0x701
       [<ffffffff8047e739>] ip_local_deliver_finish+0x157/0x24a
       [<ffffffff8047ec9a>] ip_local_deliver+0x72/0x7c
       [<ffffffff8047e5bd>] ip_rcv_finish+0x38d/0x3b2
       [<ffffffff803d3548>] ? scsi_io_completion+0x19d/0x39e
       [<ffffffff8047ebe5>] ip_rcv+0x2a2/0x2e5
       [<ffffffff80462faa>] netif_receive_skb+0x293/0x303
       [<ffffffff80465a9b>] process_backlog+0x80/0xd0
       [<ffffffff802630b4>] ? __rcu_process_callbacks+0x125/0x1b4
       [<ffffffff8046560e>] net_rx_action+0xb9/0x17f
       [<ffffffff80234cc5>] __do_softirq+0xa3/0x164
       [<ffffffff8020c52c>] call_softirq+0x1c/0x28
       <EOI>  [<ffffffff8020de1c>] do_softirq+0x34/0x72
       [<ffffffff80234b8e>] local_bh_enable_ip+0x3f/0x50
       [<ffffffff804d43ca>] _spin_unlock_bh+0x12/0x14
       [<ffffffff804599cd>] release_sock+0xb8/0xc1
       [<ffffffff804a6f9a>] inet_stream_connect+0x146/0x25c
       [<ffffffff80243078>] ? autoremove_wake_function+0x0/0x38
       [<ffffffff8045751f>] sys_connect+0x68/0x8e
       [<ffffffff80291818>] ? fd_install+0x5f/0x68
       [<ffffffff80457784>] ? sock_map_fd+0x55/0x62
       [<ffffffff8020b39b>] system_call_after_swapgs+0x7b/0x80
      
      Code: 41 10 11 d0 83 d0 00 4d 85 ed 89 45 c0 c7 45 c4 08 00 00 00 74 07 41 8b 45 04 89 45 c8 48 8b 43 20 8b 4d b8 48 8d 55 b0 48 89 de <48> 8b 80 d0 04 00 00 48 8b b8 60 01 00 00 e8 20 ae fe ff 65 48
      RIP  [<ffffffff80498503>] tcp_v4_send_ack+0x203/0x250
       RSP <ffffffff80762b78>
      CR2: 00000000000004d0
      Signed-off-by: NVitaliy Gusev <vgusev@openvz.org>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      4dd7972d
  4. 23 9月, 2008 2 次提交
  5. 22 9月, 2008 1 次提交
  6. 21 9月, 2008 17 次提交
  7. 17 9月, 2008 4 次提交
  8. 16 9月, 2008 1 次提交
  9. 13 9月, 2008 1 次提交
  10. 09 9月, 2008 2 次提交