1. 09 2月, 2010 1 次提交
    • P
      netfilter: nf_conntrack: fix hash resizing with namespaces · d696c7bd
      Patrick McHardy 提交于
      As noticed by Jon Masters <jonathan@jonmasters.org>, the conntrack hash
      size is global and not per namespace, but modifiable at runtime through
      /sys/module/nf_conntrack/hashsize. Changing the hash size will only
      resize the hash in the current namespace however, so other namespaces
      will use an invalid hash size. This can cause crashes when enlarging
      the hashsize, or false negative lookups when shrinking it.
      
      Move the hash size into the per-namespace data and only use the global
      hash size to initialize the per-namespace value when instanciating a
      new namespace. Additionally restrict hash resizing to init_net for
      now as other namespaces are not handled currently.
      
      Cc: stable@kernel.org
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      d696c7bd
  2. 13 6月, 2009 1 次提交
  3. 15 4月, 2009 1 次提交
  4. 26 3月, 2009 2 次提交
  5. 18 11月, 2008 1 次提交
    • P
      netfilter: ctnetlink: helper modules load-on-demand support · 226c0c0e
      Pablo Neira Ayuso 提交于
      This patch adds module loading for helpers via ctnetlink.
      
      * Creation path: We support explicit and implicit helper assignation. For
        the explicit case, we try to load the module. If the module is correctly
        loaded and the helper is present, we return EAGAIN to re-start the
        creation. Otherwise, we return EOPNOTSUPP.
      * Update path: release the spin lock, load the module and check. If it is
        present, then return EAGAIN to re-start the update.
      
      This patch provides a refactorized function to lookup-and-set the
      connection tracking helper. The function removes the exported symbol
      __nf_ct_helper_find as it has not clients anymore.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      226c0c0e
  6. 05 11月, 2008 1 次提交
    • A
      netfilter: netns ct: walk netns list under RTNL · efb9a8c2
      Alexey Dobriyan 提交于
      netns list (just list) is under RTNL. But helper and proto unregistration
      happen during rmmod when RTNL is not held, and that's how it was tested:
      modprobe/rmmod vs clone(CLONE_NEWNET)/exit.
      
      BUG: unable to handle kernel paging request at 0000000000100100	<===
      IP: [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      PGD 15e300067 PUD 15e1d8067 PMD 0
      Oops: 0000 [#1] PREEMPT SMP DEBUG_PAGEALLOC
      last sysfs file: /sys/kernel/uevent_seqnum
      CPU 0
      Modules linked in: nf_conntrack_proto_sctp(-) nf_conntrack_proto_dccp(-) af_packet iptable_nat nf_nat nf_conntrack_ipv4 nf_conntrack nf_defrag_ipv4 iptable_filter ip_tables xt_tcpudp ip6table_filter ip6_tables x_tables ipv6 sr_mod cdrom [last unloaded: nf_conntrack_proto_sctp]
      Pid: 16758, comm: rmmod Not tainted 2.6.28-rc2-netns-xfrm #3
      RIP: 0010:[<ffffffffa009890f>]  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
      RSP: 0018:ffff88015dc1fec8  EFLAGS: 00010212
      RAX: 0000000000000000 RBX: 00000000001000f8 RCX: 0000000000000000
      RDX: ffffffffa009575c RSI: 0000000000000003 RDI: ffffffffa00956b5
      RBP: ffff88015dc1fed8 R08: 0000000000000002 R09: 0000000000000000
      R10: 0000000000000000 R11: ffff88015dc1fe48 R12: ffffffffa0458f60
      R13: 0000000000000880 R14: 00007fff4c361d30 R15: 0000000000000880
      FS:  00007f624435a6f0(0000) GS:ffffffff80521580(0000) knlGS:0000000000000000
      CS:  0010 DS: 0000 ES: 0000 CR0: 000000008005003b
      CR2: 0000000000100100 CR3: 0000000168969000 CR4: 00000000000006e0
      DR0: 0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
      DR3: 0000000000000000 DR6: 00000000ffff0ff0 DR7: 0000000000000400
      Process rmmod (pid: 16758, threadinfo ffff88015dc1e000, task ffff880179864218)
      Stack:
       ffffffffa0459100 0000000000000000 ffff88015dc1fee8 ffffffffa0457934
       ffff88015dc1ff78 ffffffff80253fef 746e6e6f635f666e 6f72705f6b636172
       00707463735f6f74 ffffffff8024cb30 00000000023b8010 0000000000000000
      Call Trace:
       [<ffffffffa0457934>] nf_conntrack_proto_sctp_fini+0x10/0x1e [nf_conntrack_proto_sctp]
       [<ffffffff80253fef>] sys_delete_module+0x19f/0x1fe
       [<ffffffff8024cb30>] ? trace_hardirqs_on_caller+0xf0/0x114
       [<ffffffff803ea9b2>] ? trace_hardirqs_on_thunk+0x3a/0x3f
       [<ffffffff8020b52b>] system_call_fastpath+0x16/0x1b
      Code: 13 35 e0 e8 c4 6c 1a e0 48 8b 1d 6d c6 46 e0 eb 16 48 89 df 4c 89 e2 48 c7 c6 fc 85 09 a0 e8 61 cd ff ff 48 8b 5b 08 48 83 eb 08 <48> 8b 43 08 0f 18 08 48 8d 43 08 48 3d 60 4f 50 80 75 d3 5b 41
      RIP  [<ffffffffa009890f>] nf_conntrack_l4proto_unregister+0x96/0xae [nf_conntrack]
       RSP <ffff88015dc1fec8>
      CR2: 0000000000100100
      ---[ end trace bde8ac82debf7192 ]---
      Signed-off-by: NAlexey Dobriyan <adobriyan@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      efb9a8c2
  7. 08 10月, 2008 4 次提交
  8. 22 5月, 2008 1 次提交
  9. 14 4月, 2008 1 次提交
  10. 26 3月, 2008 1 次提交
  11. 01 2月, 2008 2 次提交
  12. 27 7月, 2007 1 次提交
  13. 20 7月, 2007 1 次提交
  14. 11 7月, 2007 8 次提交
  15. 08 6月, 2007 1 次提交
  16. 03 12月, 2006 7 次提交