aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4
diff options
context:
space:
mode:
Diffstat (limited to 'net/ipv4')
-rw-r--r--net/ipv4/af_inet.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/net/ipv4/af_inet.c b/net/ipv4/af_inet.c
index 5c7e42c02afb..7d12c6a9b19b 100644
--- a/net/ipv4/af_inet.c
+++ b/net/ipv4/af_inet.c
@@ -326,7 +326,7 @@ lookup_protocol:
326 } 326 }
327 327
328 err = -EPERM; 328 err = -EPERM;
329 if (sock->type == SOCK_RAW && !capable(CAP_NET_RAW)) 329 if (sock->type == SOCK_RAW && !kern && !capable(CAP_NET_RAW))
330 goto out_rcu_unlock; 330 goto out_rcu_unlock;
331 331
332 err = -EAFNOSUPPORT; 332 err = -EAFNOSUPPORT;