summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorLinux Build Service Account <lnxbuild@localhost>2016-11-17 10:08:45 -0800
committerGerrit - the friendly Code Review server <code-review@localhost>2016-11-17 10:08:44 -0800
commita2f4ac784a6f6b0aa0bdc143a90e1cdb273c8d0d (patch)
tree51b67eb5a65f2b9f018d887b0e2d3600814c39b0 /include/linux
parent5b00a91adb403b89a28e4aa45260f0ee9b5027a0 (diff)
parent68b87a2b4ab9b0883915656883a5520d4cca3d1a (diff)
Merge "tcp: take care of truncations done by sk_filter()"
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/filter.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/include/linux/filter.h b/include/linux/filter.h
index 5110d4211866..ccb98b459c59 100644
--- a/include/linux/filter.h
+++ b/include/linux/filter.h
@@ -421,7 +421,11 @@ static inline void bpf_prog_unlock_ro(struct bpf_prog *fp)
}
#endif /* CONFIG_DEBUG_SET_MODULE_RONX */
-int sk_filter(struct sock *sk, struct sk_buff *skb);
+int sk_filter_trim_cap(struct sock *sk, struct sk_buff *skb, unsigned int cap);
+static inline int sk_filter(struct sock *sk, struct sk_buff *skb)
+{
+ return sk_filter_trim_cap(sk, skb, 1);
+}
int bpf_prog_select_runtime(struct bpf_prog *fp);
void bpf_prog_free(struct bpf_prog *fp);