mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
net: Remove the member netns_ok
Every protocol has the 'netns_ok' member and it is euqal to 1. The 'if (!prot->netns_ok)' always false in inet_add_protocol(). Signed-off-by: Yejune Deng <yejunedeng@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
parent
609c8ae879
commit
5796254e46
11 changed files with 0 additions and 23 deletions
|
@ -31,12 +31,6 @@ EXPORT_SYMBOL(inet_offloads);
|
|||
|
||||
int inet_add_protocol(const struct net_protocol *prot, unsigned char protocol)
|
||||
{
|
||||
if (!prot->netns_ok) {
|
||||
pr_err("Protocol %u is not namespace aware, cannot register.\n",
|
||||
protocol);
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
return !cmpxchg((const struct net_protocol **)&inet_protos[protocol],
|
||||
NULL, prot) ? 0 : -1;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue