]> Pileus Git - ~andy/linux/blobdiff - net/llc/af_llc.c
[IPV6]: Fix IPV6_RECVERR for connected raw sockets.
[~andy/linux] / net / llc / af_llc.c
index f93b576185823321ce38897ce450a7990f263fbb..97101dcde4c0c70179aca1e52a300307a0c8354c 100644 (file)
@@ -155,6 +155,9 @@ static int llc_ui_create(struct net *net, struct socket *sock, int protocol)
        struct sock *sk;
        int rc = -ESOCKTNOSUPPORT;
 
+       if (!capable(CAP_NET_RAW))
+               return -EPERM;
+
        if (net != &init_net)
                return -EAFNOSUPPORT;