1. 13 9月, 2016 2 次提交
    • P
      netfilter: nft_dynset: allow to invert match criteria · dbd2be06
      Pablo Neira Ayuso 提交于
      The dynset expression matches if we can fit a new entry into the set.
      If there is no room for it, then it breaks the rule evaluation.
      
      This patch introduces the inversion flag so you can add rules to
      explicitly drop packets that don't fit into the set. For example:
      
       # nft filter input flow table xyz size 4 { ip saddr timeout 120s counter } overflow drop
      
      This is useful to provide a replacement for connlimit.
      
      For the rule above, every new entry uses the IPv4 address as key in the
      set, this entry gets a timeout of 120 seconds that gets refresh on every
      packet seen. If we get new flow and our set already contains 4 entries
      already, then this packet is dropped.
      
      You can already express this in positive logic, assuming default policy
      to drop:
      
       # nft filter input flow table xyz size 4 { ip saddr timeout 10s counter } accept
      Signed-off-by: NPablo Neira Ayuso <pablo@netfilter.org>
      dbd2be06
    • L
      netfilter: nft_hash: Add hash offset value · 70ca767e
      Laura Garcia Liebana 提交于
      Add support to pass through an offset to the hash value. With this
      feature, the sysadmin is able to generate a hash with a given
      offset value.
      
      Example:
      
      	meta mark set jhash ip saddr mod 2 seed 0xabcd offset 100
      
      This option generates marks according to the source address from 100 to
      101.
      Signed-off-by: NLaura Garcia Liebana <nevola@gmail.com>
      70ca767e
  2. 09 9月, 2016 2 次提交
  3. 07 9月, 2016 36 次提交