1. 12 4月, 2019 1 次提交
    • F
      bridge: netfilter: unroll NF_HOOK helper in bridge input path · 971502d7
      Florian Westphal 提交于
      Replace NF_HOOK() based invocation of the netfilter hooks with a private
      copy of nf_hook_slow().
      
      This copy has one difference: it can return the rx handler value expected
      by the stack, i.e. RX_HANDLER_CONSUMED or RX_HANDLER_PASS.
      
      This is needed by the next patch to invoke the ebtables
      "broute" table via the standard netfilter hooks rather than the custom
      "br_should_route_hook" indirection that is used now.
      
      When the skb is to be "brouted", we must return RX_HANDLER_PASS from the
      bridge rx input handler, but there is no way to indicate this via
      NF_HOOK(), unless perhaps by some hack such as exposing bridge_cb in the
      netfilter core or a percpu flag.
      
        text    data     bss     dec   filename
        3369      56       0    3425   net/bridge/br_input.o.before
        3458      40       0    3498   net/bridge/br_input.o.after
      
      This allows removal of the "br_should_route_hook" in the next patch.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Acked-by: NDavid S. Miller <davem@davemloft.net>
      Acked-by: NNikolay Aleksandrov <nikolay@cumulusnetworks.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      971502d7
  2. 06 1月, 2019 1 次提交
    • M
      jump_label: move 'asm goto' support test to Kconfig · e9666d10
      Masahiro Yamada 提交于
      Currently, CONFIG_JUMP_LABEL just means "I _want_ to use jump label".
      
      The jump label is controlled by HAVE_JUMP_LABEL, which is defined
      like this:
      
        #if defined(CC_HAVE_ASM_GOTO) && defined(CONFIG_JUMP_LABEL)
        # define HAVE_JUMP_LABEL
        #endif
      
      We can improve this by testing 'asm goto' support in Kconfig, then
      make JUMP_LABEL depend on CC_HAS_ASM_GOTO.
      
      Ugly #ifdef HAVE_JUMP_LABEL will go away, and CONFIG_JUMP_LABEL will
      match to the real kernel capability.
      Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com>
      Acked-by: Michael Ellerman <mpe@ellerman.id.au> (powerpc)
      Tested-by: NSedat Dilek <sedat.dilek@gmail.com>
      e9666d10
  3. 11 7月, 2018 1 次提交
    • T
      netfilter: Add nf_ct_get_tuple_skb global lookup function · b60a6040
      Toke Høiland-Jørgensen 提交于
      This adds a global netfilter function to extract a conntrack tuple from an
      skb. The function uses a new function added to nf_ct_hook, which will try
      to get the tuple from skb->_nfct, and do a full lookup if that fails. This
      makes it possible to use the lookup function before the skb has passed
      through the conntrack init hooks (e.g., in an ingress qdisc). The tuple is
      copied to the caller to avoid issues with reference counting.
      
      The function returns false if conntrack is not loaded, allowing it to be
      used without incurring a module dependency on conntrack. This is used by
      the NAT mode in sch_cake.
      
      Cc: netfilter-devel@vger.kernel.org
      Signed-off-by: NToke Høiland-Jørgensen <toke@toke.dk>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      b60a6040
  4. 23 5月, 2018 4 次提交
  5. 08 5月, 2018 1 次提交
  6. 28 3月, 2018 1 次提交
  7. 13 2月, 2018 1 次提交
  8. 10 1月, 2018 2 次提交
  9. 09 1月, 2018 13 次提交
  10. 09 9月, 2017 1 次提交
  11. 28 8月, 2017 3 次提交
  12. 19 7月, 2017 1 次提交
  13. 17 7月, 2017 1 次提交
  14. 01 5月, 2017 2 次提交
  15. 02 2月, 2017 1 次提交
    • F
      netfilter: merge ctinfo into nfct pointer storage area · a9e419dc
      Florian Westphal 提交于
      After this change conntrack operations (lookup, creation, matching from
      ruleset) only access one instead of two sk_buff cache lines.
      
      This works for normal conntracks because those are allocated from a slab
      that guarantees hw cacheline or 8byte alignment (whatever is larger)
      so the 3 bits needed for ctinfo won't overlap with nf_conn addresses.
      
      Template allocation now does manual address alignment (see previous change)
      on arches that don't have sufficent kmalloc min alignment.
      
      Some spots intentionally use skb->_nfct instead of skb_nfct() helpers,
      this is to avoid undoing the skb_nfct() use when we remove untracked
      conntrack object in the future.
      Signed-off-by: NFlorian Westphal <fw@strlen.de>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      a9e419dc
  16. 07 12月, 2016 2 次提交
  17. 03 11月, 2016 4 次提交