diff options
Diffstat (limited to 'include/net/sock.h')
-rw-r--r-- | include/net/sock.h | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/include/net/sock.h b/include/net/sock.h index 75b0e97ed93..96565ff0de6 100644 --- a/include/net/sock.h +++ b/include/net/sock.h | |||
@@ -873,10 +873,7 @@ static inline int sk_filter(struct sock *sk, struct sk_buff *skb, int needlock) | |||
873 | if (filter) { | 873 | if (filter) { |
874 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, | 874 | unsigned int pkt_len = sk_run_filter(skb, filter->insns, |
875 | filter->len); | 875 | filter->len); |
876 | if (!pkt_len) | 876 | err = pkt_len ? pskb_trim(skb, pkt_len) : -EPERM; |
877 | err = -EPERM; | ||
878 | else | ||
879 | skb_trim(skb, pkt_len); | ||
880 | } | 877 | } |
881 | 878 | ||
882 | if (needlock) | 879 | if (needlock) |