1. 07 8月, 2015 16 次提交
  2. 05 8月, 2015 1 次提交
    • D
      Merge git://git.kernel.org/pub/scm/linux/kernel/git/pablo/nf-next · 9dc20a64
      David S. Miller 提交于
      Pablo Neira Ayuso says:
      
      ====================
      Netfilter updates for net-next
      
      The following patchset contains Netfilter updates for net-next, they are:
      
      1) A couple of cleanups for the netfilter core hook from Eric Biederman.
      
      2) Net namespace hook registration, also from Eric. This adds a dependency with
         the rtnl_lock. This should be fine by now but we have to keep an eye on this
         because if we ever get the per-subsys nfnl_lock before rtnl we have may
         problems in the future. But we have room to remove this in the future by
         propagating the complexity to the clients, by registering hooks for the init
         netns functions.
      
      3) Update nf_tables to use the new net namespace hook infrastructure, also from
         Eric.
      
      4) Three patches to refine and to address problems from the new net namespace
         hook infrastructure.
      
      5) Switch to alternate jumpstack in xtables iff the packet is reentering. This
         only applies to a very special case, the TEE target, but Eric Dumazet
         reports that this is slowing down things for everyone else. So let's only
         switch to the alternate jumpstack if the tee target is in used through a
         static key. This batch also comes with offline precalculation of the
         jumpstack based on the callchain depth. From Florian Westphal.
      
      6) Minimal SCTP multihoming support for our conntrack helper, from Michal
         Kubecek.
      
      7) Reduce nf_bridge_info per skbuff scratchpad area to 32 bytes, from Florian
         Westphal.
      
      8) Fix several checkpatch errors in bridge netfilter, from Bernhard Thaler.
      
      9) Get rid of useless debug message in ip6t_REJECT, from Subash Abhinov.
      ====================
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      9dc20a64
  3. 04 8月, 2015 22 次提交
  4. 03 8月, 2015 1 次提交
    • D
      ebpf: add skb->hash to offset map for usage in {cls, act}_bpf or filters · ba7591d8
      Daniel Borkmann 提交于
      Add skb->hash to the __sk_buff offset map, so it can be accessed from
      an eBPF program. We currently already do this for classic BPF filters,
      but not yet on eBPF, it might be useful as a demuxer in combination with
      helpers like bpf_clone_redirect(), toy example:
      
        __section("cls-lb") int ingress_main(struct __sk_buff *skb)
        {
          unsigned int which = 3 + (skb->hash & 7);
          /* bpf_skb_store_bytes(skb, ...); */
          /* bpf_l{3,4}_csum_replace(skb, ...); */
          bpf_clone_redirect(skb, which, 0);
          return -1;
        }
      
      I was thinking whether to add skb_get_hash(), but then concluded the
      raw skb->hash seems fine in this case: we can directly access the hash
      w/o extra eBPF helper function call, it's filled out by many NICs on
      ingress, and in case the entropy level would not be sufficient, people
      can still implement their own specific sw fallback hash mix anyway.
      Signed-off-by: NDaniel Borkmann <daniel@iogearbox.net>
      Acked-by: NAlexei Starovoitov <ast@plumgrid.com>
      Signed-off-by: NDavid S. Miller <davem@davemloft.net>
      ba7591d8