1. 14 1月, 2011 1 次提交
    • P
      netfilter: fix Kconfig dependencies · c7066f70
      Patrick McHardy 提交于
      Fix dependencies of netfilter realm match: it depends on NET_CLS_ROUTE,
      which itself depends on NET_SCHED; this dependency is missing from netfilter.
      
      Since matching on realms is also useful without having NET_SCHED enabled and
      the option really only controls whether the tclassid member is included in
      route and dst entries, rename the config option to IP_ROUTE_CLASSID and move
      it outside of traffic scheduling context to get rid of the NET_SCHED dependeny.
      Reported-by: NVladis Kletnieks <Valdis.Kletnieks@vt.edu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      c7066f70
  2. 25 11月, 2010 8 次提交
  3. 16 11月, 2010 11 次提交
  4. 15 11月, 2010 2 次提交
  5. 13 11月, 2010 2 次提交
  6. 12 11月, 2010 1 次提交
  7. 30 10月, 2010 1 次提交
  8. 29 10月, 2010 1 次提交
  9. 28 10月, 2010 1 次提交
  10. 26 10月, 2010 1 次提交
  11. 21 10月, 2010 11 次提交
    • B
      tproxy: use the interface primary IP address as a default value for --on-ip · cc6eb433
      Balazs Scheidler 提交于
      The REDIRECT target and the older TProxy versions used the primary address
      of the incoming interface as the default value of the --on-ip parameter.
      This was unintentionally changed during the initial TProxy submission and
      caused confusion among users.
      
      Since IPv6 has no notion of primary address, we just select the first address
      on the list: this way the socket lookup finds wildcard bound sockets
      properly and we cannot really do better without the user telling us the
      IPv6 address of the proxy.
      
      This is implemented for both IPv4 and IPv6.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NKOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      cc6eb433
    • B
      tproxy: added IPv6 support to the socket match · b64c9256
      Balazs Scheidler 提交于
      The ICMP extraction bits were contributed by Harry Mason.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NKOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      b64c9256
    • B
      tproxy: added IPv6 support to the TPROXY target · 6ad78893
      Balazs Scheidler 提交于
      This requires a new revision as the old target structure was
      IPv4 specific.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NKOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      6ad78893
    • B
      tproxy: add lookup type checks for UDP in nf_tproxy_get_sock_v4() · 6006db84
      Balazs Scheidler 提交于
      Also, inline this function as the lookup_type is always a literal
      and inlining removes branches performed at runtime.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NKOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      6006db84
    • B
      tproxy: kick out TIME_WAIT sockets in case a new connection comes in with the same tuple · 106e4c26
      Balazs Scheidler 提交于
      Without tproxy redirections an incoming SYN kicks out conflicting
      TIME_WAIT sockets, in order to handle clients that reuse ports
      within the TIME_WAIT period.
      
      The same mechanism didn't work in case TProxy is involved in finding
      the proper socket, as the time_wait processing code looked up the
      listening socket assuming that the listener addr/port matches those
      of the established connection.
      
      This is not the case with TProxy as the listener addr/port is possibly
      changed with the tproxy rule.
      Signed-off-by: NBalazs Scheidler <bazsi@balabit.hu>
      Signed-off-by: NKOVACS Krisztian <hidden@balabit.hu>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      106e4c26
    • J
      ipvs: provide address family for debugging · 0d79641a
      Julian Anastasov 提交于
       	As skb->protocol is not valid in LOCAL_OUT add
      parameter for address family in packet debugging functions.
      Even if ports are not present in AH and ESP change them to
      use ip_vs_tcpudp_debug_packet to show at least valid addresses
      as before. This patch removes the last user of skb->protocol
      in IPVS.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      0d79641a
    • J
      ipvs: inherit forwarding method in backup · 3233759b
      Julian Anastasov 提交于
       	Connections in backup server should inherit the
      forwarding method from real server. It is a way to fix a
      problem where the forwarding method in backup connection
      is damaged by logical OR operation with the real server's
      connection flags. And the change is needed for setups
      where the backup server uses different forwarding method
      for the same real servers.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      3233759b
    • J
      ipvs: changes for local client · cb59155f
      Julian Anastasov 提交于
      	This patch deals with local client processing.
      
      	Prefer LOCAL_OUT hook for scheduling connections from
      local clients. LOCAL_IN is still supported if the packets are
      not marked as processed in LOCAL_OUT. The idea to process
      requests in LOCAL_OUT is to alter conntrack reply before
      it is confirmed at POST_ROUTING. If the local requests are
      processed in LOCAL_IN the conntrack can not be updated
      and matching by state is impossible.
      
      	Add the following handlers:
      
      - ip_vs_reply[46] at LOCAL_IN:99 to process replies from
      remote real servers to local clients. Now when both
      replies from remote real servers (ip_vs_reply*) and
      local real servers (ip_vs_local_reply*) are handled
      it is safe to remove the conn_out_get call from ip_vs_in
      because it does not support related ICMP packets.
      
      - ip_vs_local_request[46] at LOCAL_OUT:-98 to process
      requests from local client
      
      	Handling in LOCAL_OUT causes some changes:
      
      - as skb->dev, skb->protocol and skb->pkt_type are not defined
      in LOCAL_OUT make sure we set skb->dev before calling icmpv6_send,
      prefer skb_dst(skb) for struct net and remove the skb->protocol
      checks from TUN transmitters.
      
      [ horms@verge.net.au: removed trailing whitespace ]
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      cb59155f
    • J
      ipvs: changes for local real server · fc604767
      Julian Anastasov 提交于
       	This patch deals with local real servers:
      
      - Add support for DNAT to local address (different real server port).
      It needs ip_vs_out hook in LOCAL_OUT for both families because
      skb->protocol is not set for locally generated packets and can not
      be used to set 'af'.
      
      - Skip packets in ip_vs_in marked with skb->ipvs_property because
      ip_vs_out processing can be executed in LOCAL_OUT but we still
      have the conn_out_get check in ip_vs_in.
      
      - Ignore packets with inet->nodefrag from local stack
      
      - Require skb_dst(skb) != NULL because we use it to get struct net
      
      - Add support for changing the route to local IPv4 stack after DNAT
      depending on the source address type. Local client sets output
      route and the remote client sets input route. It looks like
      IPv6 does not need such rerouting because the replies use
      addresses from initial incoming header, not from skb route.
      
      - All transmitters now have strict checks for the destination
      address type: redirect from non-local address to local real
      server requires NAT method, local address can not be used as
      source address when talking to remote real server.
      
      - Now LOCALNODE is not set explicitly as forwarding
      method in real server to allow the connections to provide
      correct forwarding method to the backup server. Not sure if
      this breaks tools that expect to see 'Local' real server type.
      If needed, this can be supported with new flag IP_VS_DEST_F_LOCAL.
      Now it should be possible connections in backup that lost
      their fwmark information during sync to be forwarded properly
      to their daddr, even if it is local address in the backup server.
      By this way backup could be used as real server for DR or TUN,
      for NAT there are some restrictions because tuple collisions
      in conntracks can create problems for the traffic.
      
      - Call ip_vs_dst_reset when destination is updated in case
      some real server IP type is changed between local and remote.
      
      [ horms@verge.net.au: removed trailing whitespace ]
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      fc604767
    • J
      ipvs: move ip_route_me_harder for ICMP · f5a41847
      Julian Anastasov 提交于
       	Currently, ip_route_me_harder after ip_vs_out_icmp
      is called even if packet is not related to IPVS connection.
      Move it into handle_response_icmp. Also, force rerouting
      if sending to local client because IPv4 stack uses addresses
      from the route.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      f5a41847
    • J
      ipvs: create ip_vs_defrag_user · 1ca5bb54
      Julian Anastasov 提交于
       	Create new function ip_vs_defrag_user to return correct
      IP_DEFRAG_xxx user depending on the hooknum. It will be needed
      when we add handlers in LOCAL_OUT.
      Signed-off-by: NJulian Anastasov <ja@ssi.bg>
      Signed-off-by: NSimon Horman <horms@verge.net.au>
      1ca5bb54