1. 03 Mar, 2015 2 commits
    • Florian Westphal's avatar
      netfilter: bridge: rework reject handling · 72500bc1
      Florian Westphal authored
      bridge reject handling is not straightforward, there are many subtle
      differences depending on configuration.
      
      skb->dev is either the bridge port (PRE_ROUTING) or the bridge
      itself (INPUT), so we need to use indev instead.
      
      Also, checksum validation will only work reliably if we trim skb
      according to the l3 header size.
      
      While at it, add csum validation for ipv6 and skip existing tests
      if skb was already checked e.g. by GRO.
      Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      72500bc1
    • Florian Westphal's avatar
      netfilter: reject: don't send icmp error if csum is invalid · ee586bbc
      Florian Westphal authored
      tcp resets are never emitted if the packet that triggers the
      reject/reset has an invalid checksum.
      
      For icmp error responses there was no such check.
      It allows to distinguish icmp response generated via
      
      iptables -I INPUT -p udp --dport 42 -j REJECT
      
      and those emitted by network stack (won't respond if csum is invalid,
      REJECT does).
      
      Arguably its possible to avoid this by using conntrack and only
      using REJECT with -m conntrack NEW/RELATED.
      
      However, this doesn't work when connection tracking is not in use
      or when using nf_conntrack_checksum=0.
      
      Furthermore, sending errors in response to invalid csums doesn't make
      much sense so just add similar test as in nf_send_reset.
      
      Validate csum if needed and only send the response if it is ok.
      
      Reference: http://bugzilla.redhat.com/show_bug.cgi?id=1169829Signed-off-by: default avatarFlorian Westphal <fw@strlen.de>
      Signed-off-by: default avatarPablo Neira Ayuso <pablo@netfilter.org>
      ee586bbc
  2. 02 Mar, 2015 37 commits
  3. 01 Mar, 2015 1 commit
    • David S. Miller's avatar
      Merge branch 'ebpf_support_for_cls_bpf' · 68932f71
      David S. Miller authored
      Daniel Borkmann says:
      
      ====================
      eBPF support for cls_bpf
      
      This is the non-RFC version of my patchset posted before netdev01 [1]
      conference. It contains a couple of eBPF cleanups and preparation
      patches to get eBPF support into cls_bpf. The last patch adds the
      actual support. I'll post the iproute2 parts after the kernel bits
      are merged, an initial preview link to the code is mentioned in the
      last patch.
      
      Patch 4 and 5 were originally one patch, but I've split them into
      two parts upon request as patch 4 only is also needed for Alexei's
      tracing patches that go via tip tree.
      
      Tested with tc and all in-kernel available BPF test suites.
      
      I have configured and built LLVM with --enable-experimental-targets=BPF
      but as Alexei put it, the plan is to get rid of the experimental
      status in future [2].
      
      Thanks a lot!
      
      v1 -> v2:
       - Removed arch patches from this series
        - x86 is already queued in tip tree, under x86/mm
        - arm64 just reposted directly to arm folks
       - Rest is unchanged
      
        [1] http://thread.gmane.org/gmane.linux.network/350191
        [2] http://article.gmane.org/gmane.linux.kernel/1874969
      ====================
      Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
      68932f71