aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2016-06-10 18:00:57 -0700
committerDavid S. Miller <davem@davemloft.net>2016-06-10 18:00:57 -0700
commit92595aea8a4b82c5b2d3b4fc1c0982861e24873c (patch)
tree6d1c2d77f099680ce4bfcbe15a54a6b0ed77ff5f /include/linux
parentopenvswitch: Add packet truncation support. (diff)
parentbpf: reject wrong sized filters earlier (diff)
Merge branch 'bpf-fixes'
Daniel Borkmann says: ==================== bpf: couple of fixes These are two fixes for BPF, one to introduce xmit recursion limiter for tc bpf programs and the other one to reject filters a bit earlier. For more details please see individual patches. I have no strong opinion to which tree they should go, they apply to both, but I think net-next seems okay to me. ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/netdevice.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 4f234b102892..94eef356a65f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -2389,6 +2389,8 @@ void synchronize_net(void);
int init_dummy_netdev(struct net_device *dev);
DECLARE_PER_CPU(int, xmit_recursion);
+#define XMIT_RECURSION_LIMIT 10
+
static inline int dev_recursion_level(void)
{
return this_cpu_read(xmit_recursion);