diff options
author | Yejune Deng | 2021-05-17 20:22:05 +0800 |
---|---|---|
committer | David S. Miller | 2021-05-17 15:29:35 -0700 |
commit | 5796254e467bf1cff002df65fbb53ecef6a0e060 (patch) | |
tree | ca70e2099a69aaa37e6b1b4372edacce5040d0ca /net/ipv4/protocol.c | |
parent | 609c8ae87966b60ace1ea70624b566bf686d43c9 (diff) |
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>
Diffstat (limited to 'net/ipv4/protocol.c')
-rw-r--r-- | net/ipv4/protocol.c | 6 |
1 files changed, 0 insertions, 6 deletions
diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c index 9a8c0892622b..6913979948d7 100644 --- a/net/ipv4/protocol.c +++ b/net/ipv4/protocol.c @@ -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; } |