aboutsummaryrefslogtreecommitdiff
path: root/net/core/filter.c
diff options
context:
space:
mode:
authorWolfram Sang <wsa@kernel.org>2020-05-20 15:27:45 +0200
committerWolfram Sang <wsa@kernel.org>2020-05-20 15:27:45 +0200
commitf89c326dcaa0cb8c3af7764e75eeed4e3f3c879a (patch)
tree31a5967da1f04180a1a922258f6947ad17255ee8 /net/core/filter.c
parent6fe12cdbcfe35ad4726a619a9546822d34fc934c (diff)
parentefa7fb4c6c8e4171fd29a5935a9dc7a28e363278 (diff)
Merge branch 'i2c/for-current-fixed' into i2c/for-5.8
Diffstat (limited to 'net/core/filter.c')
-rw-r--r--net/core/filter.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/core/filter.c b/net/core/filter.c
index 7628b947dbc3..7d6ceaa54d21 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5925,7 +5925,7 @@ BPF_CALL_3(bpf_sk_assign, struct sk_buff *, skb, struct sock *, sk, u64, flags)
return -EOPNOTSUPP;
if (unlikely(dev_net(skb->dev) != sock_net(sk)))
return -ENETUNREACH;
- if (unlikely(sk->sk_reuseport))
+ if (unlikely(sk_fullsock(sk) && sk->sk_reuseport))
return -ESOCKTNOSUPPORT;
if (sk_is_refcounted(sk) &&
unlikely(!refcount_inc_not_zero(&sk->sk_refcnt)))