--- f60c0c2aacba5f1a99fe4a2fe159f43a09b78f07 +++ 519ff9d46e40fb973a192a9cec779f29ae75a286 @@ -67,6 +67,8 @@ static int pn_socket_create(struct net * struct phonet_protocol *pnp; int err; + if (!net_eq(net, &init_net)) + return -EAFNOSUPPORT; if (!capable(CAP_SYS_ADMIN)) return -EPERM; @@ -353,6 +355,8 @@ static int phonet_rcv(struct sk_buff *sk struct sockaddr_pn sa; u16 len; + if (!net_eq(net, &init_net)) + goto out; /* check we have at least a full Phonet header */ if (!pskb_pull(skb, sizeof(struct phonethdr))) goto out;