1. 02 10月, 2019 1 次提交
    • P
      netfilter: nft_connlimit: disable bh on garbage collection · 34a4c95a
      Pablo Neira Ayuso 提交于
      BH must be disabled when invoking nf_conncount_gc_list() to perform
      garbage collection, otherwise deadlock might happen.
      
        nf_conncount_add+0x1f/0x50 [nf_conncount]
        nft_connlimit_eval+0x4c/0xe0 [nft_connlimit]
        nft_dynset_eval+0xb5/0x100 [nf_tables]
        nft_do_chain+0xea/0x420 [nf_tables]
        ? sch_direct_xmit+0x111/0x360
        ? noqueue_init+0x10/0x10
        ? __qdisc_run+0x84/0x510
        ? tcp_packet+0x655/0x1610 [nf_conntrack]
        ? ip_finish_output2+0x1a7/0x430
        ? tcp_error+0x130/0x150 [nf_conntrack]
        ? nf_conntrack_in+0x1fc/0x4c0 [nf_conntrack]
        nft_do_chain_ipv4+0x66/0x80 [nf_tables]
        nf_hook_slow+0x44/0xc0
        ip_rcv+0xb5/0xd0
        ? ip_rcv_finish_core.isra.19+0x360/0x360
        __netif_receive_skb_one_core+0x52/0x70
        netif_receive_skb_internal+0x34/0xe0
        napi_gro_receive+0xba/0xe0
        e1000_clean_rx_irq+0x1e9/0x420 [e1000e]
        e1000e_poll+0xbe/0x290 [e1000e]
        net_rx_action+0x149/0x3b0
        __do_softirq+0xde/0x2d8
        irq_exit+0xba/0xc0
        do_IRQ+0x85/0xd0
        common_interrupt+0xf/0xf
        </IRQ>
        RIP: 0010:nf_conncount_gc_list+0x3b/0x130 [nf_conncount]
      
      Fixes: 2f971a8f ("netfilter: nf_conncount: move all list iterations under spinlock")
      Reported-by: NLaura Garcia Liebana <nevola@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      34a4c95a
  2. 29 12月, 2018 1 次提交
  3. 18 7月, 2018 3 次提交
  4. 13 6月, 2018 1 次提交
  5. 03 6月, 2018 1 次提交
    • P
      netfilter: nf_tables: add connlimit support · 290180e2
      Pablo Neira Ayuso 提交于
      This features which allows you to limit the maximum number of
      connections per arbitrary key. The connlimit expression is stateful,
      therefore it can be used from meters to dynamically populate a set, this
      provides a mapping to the iptables' connlimit match. This patch also
      comes that allows you define static connlimit policies.
      
      This extension depends on the nf_conncount infrastructure.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      290180e2