commit 9e3ddb21568284fb9061a91bbd3158909b1dec45 Author: Paul Wouters Date: Sun Sep 1 15:18:37 2013 -0400 * Fix for loading non-namespace aware ipv4 protocols without CONFIG_NAMESPACES set. IPv6 does not have this check. diff --git a/net/ipv4/protocol.c b/net/ipv4/protocol.c index ce84846..b5f785c 100644 --- a/net/ipv4/protocol.c +++ b/net/ipv4/protocol.c @@ -37,11 +37,13 @@ const struct net_offload __rcu *inet_offloads[MAX_INET_PROTOS] __read_mostly; int inet_add_protocol(const struct net_protocol *prot, unsigned char protocol) { +#ifdef CONFIG_NAMESPACES if (!prot->netns_ok) { pr_err("Protocol %u is not namespace aware, cannot register.\n", protocol); return -EINVAL; } +#endif return !cmpxchg((const struct net_protocol **)&inet_protos[protocol], NULL, prot) ? 0 : -1;