1. 16 6月, 2012 1 次提交
  2. 17 5月, 2012 1 次提交
  3. 30 4月, 2012 1 次提交
  4. 04 4月, 2012 2 次提交
  5. 03 4月, 2012 1 次提交
  6. 23 3月, 2012 3 次提交
  7. 08 3月, 2012 1 次提交
    • P
      netfilter: xt_CT: allow to attach timeout policy + glue code · 24de58f4
      Pablo Neira Ayuso 提交于
      This patch allows you to attach the timeout policy via the
      CT target, it adds a new revision of the target to ensure
      backward compatibility. Moreover, it also contains the glue
      code to stick the timeout object defined via nfnetlink_cttimeout
      to the given flow.
      
      Example usage (it requires installing the nfct tool and
      libnetfilter_cttimeout):
      
      1) create the timeout policy:
      
       nfct timeout add tcp-policy0 inet tcp \
      	established 1000 close 10 time_wait 10 last_ack 10
      
      2) attach the timeout policy to the packet:
      
       iptables -I PREROUTING -t raw -p tcp -j CT --timeout tcp-policy0
      
      You have to install the following user-space software:
      
      a) libnetfilter_cttimeout:
         git://git.netfilter.org/libnetfilter_cttimeout
      
      b) nfct:
         git://git.netfilter.org/nfct
      
      You also have to get iptables with -j CT --timeout support.
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      24de58f4
  8. 16 1月, 2012 1 次提交
    • P
      netfilter: revert user-space expectation helper support · 9bf04646
      Pablo Neira Ayuso 提交于
      This patch partially reverts:
      3d058d7b netfilter: rework user-space expectation helper support
      that was applied during the 3.2 development cycle.
      
      After this patch, the tree remains just like before patch bc01befd,
      that initially added the preliminary infrastructure.
      
      I decided to partially revert this patch because the approach
      that I proposed to resolve this problem is broken in NAT setups.
      Moreover, a new infrastructure will be submitted for the 3.3.x
      development cycle that resolve the existing issues while
      providing a neat solution.
      
      Since nobody has been seriously using this infrastructure in
      user-space, the removal of this feature should affect any know
      FOSS project (to my knowledge).
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      9bf04646
  9. 23 12月, 2011 1 次提交
    • P
      netfilter: rework user-space expectation helper support · 3d058d7b
      Pablo Neira Ayuso 提交于
      This partially reworks bc01befd
      which added userspace expectation support.
      
      This patch removes the nf_ct_userspace_expect_list since now we
      force to use the new iptables CT target feature to add the helper
      extension for conntracks that have attached expectations from
      userspace.
      
      A new version of the proof-of-concept code to implement userspace
      helpers from userspace is available at:
      
      http://people.netfilter.org/pablo/userspace-conntrack-helpers/nf-ftp-helper-POC.tar.bz2
      
      This patch also modifies the CT target to allow to set the
      conntrack's userspace helper status flags. This flag is used
      to tell the conntrack system to explicitly allocate the helper
      extension.
      
      This helper extension is useful to link the userspace expectations
      with the master conntrack that is being tracked from one userspace
      helper.
      
      This feature fixes a problem in the current approach of the
      userspace helper support. Basically, if the master conntrack that
      has got a userspace expectation vanishes, the expectations point to
      one invalid memory address. Thus, triggering an oops in the
      expectation deletion event path.
      
      I decided not to add a new revision of the CT target because
      I only needed to add a new flag for it. I'll document in this
      issue in the iptables manpage. I have also changed the return
      value from EINVAL to EOPNOTSUPP if one flag not supported is
      specified. Thus, in the future adding new features that only
      require a new flag can be added without a new revision.
      
      There is no official code using this in userspace (apart from
      the proof-of-concept) that uses this infrastructure but there
      will be some by beginning 2012.
      Reported-by: NSam Roberts <vieuxtech@gmail.com>
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      3d058d7b
  10. 21 4月, 2011 1 次提交
  11. 21 10月, 2010 1 次提交
  12. 08 6月, 2010 1 次提交
    • E
      netfilter: nf_conntrack: IPS_UNTRACKED bit · 5bfddbd4
      Eric Dumazet 提交于
      NOTRACK makes all cpus share a cache line on nf_conntrack_untracked
      twice per packet. This is bad for performance.
      __read_mostly annotation is also a bad choice.
      
      This patch introduces IPS_UNTRACKED bit so that we can use later a
      per_cpu untrack structure more easily.
      
      A new helper, nf_ct_untracked_get() returns a pointer to
      nf_conntrack_untracked.
      
      Another one, nf_ct_untracked_status_or() is used by nf_nat_init() to add
      IPS_NAT_DONE_MASK bits to untracked status.
      
      nf_ct_is_untracked() prototype is changed to work on a nf_conn pointer.
      Signed-off-by: NEric Dumazet <eric.dumazet@gmail.com>
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      5bfddbd4
  13. 12 5月, 2010 1 次提交
  14. 30 3月, 2010 1 次提交
    • T
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking... · 5a0e3ad6
      Tejun Heo 提交于
      include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
      
      percpu.h is included by sched.h and module.h and thus ends up being
      included when building most .c files.  percpu.h includes slab.h which
      in turn includes gfp.h making everything defined by the two files
      universally available and complicating inclusion dependencies.
      
      percpu.h -> slab.h dependency is about to be removed.  Prepare for
      this change by updating users of gfp and slab facilities include those
      headers directly instead of assuming availability.  As this conversion
      needs to touch large number of source files, the following script is
      used as the basis of conversion.
      
        http://userweb.kernel.org/~tj/misc/slabh-sweep.py
      
      The script does the followings.
      
      * Scan files for gfp and slab usages and update includes such that
        only the necessary includes are there.  ie. if only gfp is used,
        gfp.h, if slab is used, slab.h.
      
      * When the script inserts a new include, it looks at the include
        blocks and try to put the new include such that its order conforms
        to its surrounding.  It's put in the include block which contains
        core kernel includes, in the same order that the rest are ordered -
        alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
        doesn't seem to be any matching order.
      
      * If the script can't find a place to put a new include (mostly
        because the file doesn't have fitting include block), it prints out
        an error message indicating which .h file needs to be added to the
        file.
      
      The conversion was done in the following steps.
      
      1. The initial automatic conversion of all .c files updated slightly
         over 4000 files, deleting around 700 includes and adding ~480 gfp.h
         and ~3000 slab.h inclusions.  The script emitted errors for ~400
         files.
      
      2. Each error was manually checked.  Some didn't need the inclusion,
         some needed manual addition while adding it to implementation .h or
         embedding .c file was more appropriate for others.  This step added
         inclusions to around 150 files.
      
      3. The script was run again and the output was compared to the edits
         from #2 to make sure no file was left behind.
      
      4. Several build tests were done and a couple of problems were fixed.
         e.g. lib/decompress_*.c used malloc/free() wrappers around slab
         APIs requiring slab.h to be added manually.
      
      5. The script was run on all .h files but without automatically
         editing them as sprinkling gfp.h and slab.h inclusions around .h
         files could easily lead to inclusion dependency hell.  Most gfp.h
         inclusion directives were ignored as stuff from gfp.h was usually
         wildly available and often used in preprocessor macros.  Each
         slab.h inclusion directive was examined and added manually as
         necessary.
      
      6. percpu.h was updated not to include slab.h.
      
      7. Build test were done on the following configurations and failures
         were fixed.  CONFIG_GCOV_KERNEL was turned off for all tests (as my
         distributed build env didn't work with gcov compiles) and a few
         more options had to be turned off depending on archs to make things
         build (like ipr on powerpc/64 which failed due to missing writeq).
      
         * x86 and x86_64 UP and SMP allmodconfig and a custom test config.
         * powerpc and powerpc64 SMP allmodconfig
         * sparc and sparc64 SMP allmodconfig
         * ia64 SMP allmodconfig
         * s390 SMP allmodconfig
         * alpha SMP allmodconfig
         * um on x86_64 SMP allmodconfig
      
      8. percpu.h modifications were reverted so that it could be applied as
         a separate patch and serve as bisection point.
      
      Given the fact that I had only a couple of failures from tests on step
      6, I'm fairly confident about the coverage of this conversion patch.
      If there is a breakage, it's likely to be something in one of the arch
      headers which should be easily discoverable easily on most builds of
      the specific arch.
      Signed-off-by: NTejun Heo <tj@kernel.org>
      Guess-its-ok-by: NChristoph Lameter <cl@linux-foundation.org>
      Cc: Ingo Molnar <mingo@redhat.com>
      Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
      5a0e3ad6
  15. 25 3月, 2010 3 次提交
  16. 18 3月, 2010 1 次提交
  17. 17 3月, 2010 1 次提交
  18. 16 2月, 2010 1 次提交
  19. 04 2月, 2010 1 次提交
    • P
      netfilter: xtables: add CT target · 84f3bb9a
      Patrick McHardy 提交于
      Add a new target for the raw table, which can be used to specify conntrack
      parameters for specific connections, f.i. the conntrack helper.
      
      The target attaches a "template" connection tracking entry to the skb, which
      is used by the conntrack core when initializing a new conntrack.
      Signed-off-by: NPatrick McHardy <kaber@trash.net>
      84f3bb9a