1. 19 3月, 2016 10 次提交
  2. 18 3月, 2016 3 次提交
  3. 17 3月, 2016 19 次提交
  4. 15 3月, 2016 8 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 1cdba550
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter/IPVS/OVS updates for net-next
      
      The following patchset contains Netfilter/IPVS fixes and OVS NAT
      support, more specifically this batch is composed of:
      
      1) Fix a crash in ipset when performing a parallel flush/dump with
         set:list type, from Jozsef Kadlecsik.
      
      2) Make sure NFACCT_FILTER_* netlink attributes are in place before
         accessing them, from Phil Turnbull.
      
      3) Check return error code from ip_vs_fill_iph_skb_off() in IPVS SIP
         helper, from Arnd Bergmann.
      
      4) Add workaround to IPVS to reschedule existing connections to new
         destination server by dropping the packet and wait for retransmission
         of TCP syn packet, from Julian Anastasov.
      
      5) Allow connection rescheduling in IPVS when in CLOSE state, also
         from Julian.
      
      6) Fix wrong offset of SIP Call-ID in IPVS helper, from Marco Angaroni.
      
      7) Validate IPSET_ATTR_ETHER netlink attribute length, from Jozsef.
      
      8) Check match/targetinfo netlink attribute size in nft_compat,
         patch from Florian Westphal.
      
      9) Check for integer overflow on 32-bit systems in x_tables, from
         Florian Westphal.
      
      Several patches from Jarno Rajahalme to prepare the introduction of
      NAT support to OVS based on the Netfilter infrastructure:
      
      10) Schedule IP_CT_NEW_REPLY definition for removal in
          nf_conntrack_common.h.
      
      11) Simplify checksumming recalculation in nf_nat.
      
      12) Add comments to the openvswitch conntrack code, from Jarno.
      
      13) Update the CT state key only after successful nf_conntrack_in()
          invocation.
      
      14) Find existing conntrack entry after upcall.
      
      15) Handle NF_REPEAT case due to templates in nf_conntrack_in().
      
      16) Call the conntrack helper functions once the conntrack has been
          confirmed.
      
      17) And finally, add the NAT interface to OVS.
      
      The batch closes with:
      
      18) Cleanup to use spin_unlock_wait() instead of
          spin_lock()/spin_unlock(), from Nicholas Mc Guire.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      1cdba550
    • N
      netfilter: nf_conntrack: consolidate lock/unlock into unlock_wait · e39365be
      Nicholas Mc Guire 提交于
      The spin_lock()/spin_unlock() is synchronizing on the
      nf_conntrack_locks_all_lock which is equivalent to
      spin_unlock_wait() but the later should be more efficient.
      Signed-off-by: NNicholas Mc Guire <hofrat@osadl.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      e39365be
    • E
      net: diag: add a scheduling point in inet_diag_dump_icsk() · acffb584
      Eric Dumazet 提交于
      On loaded TCP servers, looking at millions of sockets can hold
      cpu for many seconds, if the lookup condition is very narrow.
      
      (eg : ss dst 1.2.3.4 )
      
      Better add a cond_resched() to allow other processes to access
      the cpu.
      Signed-off-by: NEric Dumazet <edumazet@google.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      acffb584
    • A
      smc91x: avoid self-comparison warning · e3ebd894
      Arnd Bergmann 提交于
      The smc91x driver defines a macro that compares its argument to
      itself, apparently to get a true result while using its argument
      to avoid a warning about unused local variables.
      
      Unfortunately, this triggers a warning with gcc-6, as the comparison
      is obviously useless:
      
      drivers/net/ethernet/smsc/smc91x.c: In function 'smc_hardware_send_pkt':
      drivers/net/ethernet/smsc/smc91x.c:563:14: error: self-comparison always evaluates to true [-Werror=tautological-compare]
        if (!smc_special_trylock(&lp->lock, flags)) {
      
      This replaces the macro with another one that behaves similarly,
      with a cast to (void) to ensure the argument is used, and using
      a literal 'true' as its value.
      Signed-off-by: NArnd Bergmann <arnd@arndb.de>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      e3ebd894
    • J
      openvswitch: Interface with NAT. · 05752523
      Jarno Rajahalme 提交于
      Extend OVS conntrack interface to cover NAT.  New nested
      OVS_CT_ATTR_NAT attribute may be used to include NAT with a CT action.
      A bare OVS_CT_ATTR_NAT only mangles existing and expected connections.
      If OVS_NAT_ATTR_SRC or OVS_NAT_ATTR_DST is included within the nested
      attributes, new (non-committed/non-confirmed) connections are mangled
      according to the rest of the nested attributes.
      
      The corresponding OVS userspace patch series includes test cases (in
      tests/system-traffic.at) that also serve as example uses.
      
      This work extends on a branch by Thomas Graf at
      https://github.com/tgraf/ovs/tree/nat.
      Signed-off-by: NJarno Rajahalme <jarno@ovn.org>
      Acked-by: NThomas Graf <tgraf@suug.ch>
      Acked-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      05752523
    • J
      openvswitch: Delay conntrack helper call for new connections. · 28b6e0c1
      Jarno Rajahalme 提交于
      There is no need to help connections that are not confirmed, so we can
      delay helping new connections to the time when they are confirmed.
      This change is needed for NAT support, and having this as a separate
      patch will make the following NAT patch a bit easier to review.
      Signed-off-by: NJarno Rajahalme <jarno@ovn.org>
      Acked-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      28b6e0c1
    • J
      openvswitch: Handle NF_REPEAT in conntrack action. · 5b6b9293
      Jarno Rajahalme 提交于
      Repeat the nf_conntrack_in() call when it returns NF_REPEAT.  This
      avoids dropping a SYN packet re-opening an existing TCP connection.
      Signed-off-by: NJarno Rajahalme <jarno@ovn.org>
      Acked-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      5b6b9293
    • J
      openvswitch: Find existing conntrack entry after upcall. · 289f2253
      Jarno Rajahalme 提交于
      Add a new function ovs_ct_find_existing() to find an existing
      conntrack entry for which this packet was already applied to.  This is
      only to be called when there is evidence that the packet was already
      tracked and committed, but we lost the ct reference due to an
      userspace upcall.
      
      ovs_ct_find_existing() is called from skb_nfct_cached(), which can now
      hide the fact that the ct reference may have been lost due to an
      upcall.  This allows ovs_ct_commit() to be simplified.
      
      This patch is needed by later "openvswitch: Interface with NAT" patch,
      as we need to be able to pass the packet through NAT using the
      original ct reference also after the reference is lost after an
      upcall.
      Signed-off-by: NJarno Rajahalme <jarno@ovn.org>
      Acked-by: NJoe Stringer <joe@ovn.org>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      289f2253