|
@@ -263,21 +263,6 @@ void build_ehash_secret(void)
|
|
}
|
|
}
|
|
EXPORT_SYMBOL(build_ehash_secret);
|
|
EXPORT_SYMBOL(build_ehash_secret);
|
|
|
|
|
|
-static inline int inet_netns_ok(struct net *net, __u8 protocol)
|
|
|
|
-{
|
|
|
|
- const struct net_protocol *ipprot;
|
|
|
|
-
|
|
|
|
- if (net_eq(net, &init_net))
|
|
|
|
- return 1;
|
|
|
|
-
|
|
|
|
- ipprot = rcu_dereference(inet_protos[protocol]);
|
|
|
|
- if (ipprot == NULL) {
|
|
|
|
- /* raw IP is OK */
|
|
|
|
- return 1;
|
|
|
|
- }
|
|
|
|
- return ipprot->netns_ok;
|
|
|
|
-}
|
|
|
|
-
|
|
|
|
/*
|
|
/*
|
|
* Create an inet socket.
|
|
* Create an inet socket.
|
|
*/
|
|
*/
|
|
@@ -350,10 +335,6 @@ lookup_protocol:
|
|
!ns_capable(net->user_ns, CAP_NET_RAW))
|
|
!ns_capable(net->user_ns, CAP_NET_RAW))
|
|
goto out_rcu_unlock;
|
|
goto out_rcu_unlock;
|
|
|
|
|
|
- err = -EAFNOSUPPORT;
|
|
|
|
- if (!inet_netns_ok(net, protocol))
|
|
|
|
- goto out_rcu_unlock;
|
|
|
|
-
|
|
|
|
sock->ops = answer->ops;
|
|
sock->ops = answer->ops;
|
|
answer_prot = answer->prot;
|
|
answer_prot = answer->prot;
|
|
answer_no_check = answer->no_check;
|
|
answer_no_check = answer->no_check;
|