[patch 2/2][NETNS49][IPV4][UDPLITE] activate udplite per network
namespace
Daniel Lezcano
dlezcano at fr.ibm.com
Tue Oct 9 10:00:09 PDT 2007
This patch activates the udplite protocol for multiple
network namespaces.
Signed-off-by: Daniel Lezcano <dlezcano at fr.ibm.com>
---
net/ipv4/udplite.c | 12 +-----------
1 file changed, 1 insertion(+), 11 deletions(-)
Index: linux-2.6-netns/net/ipv4/udplite.c
===================================================================
--- linux-2.6-netns.orig/net/ipv4/udplite.c
+++ linux-2.6-netns/net/ipv4/udplite.c
@@ -30,18 +30,11 @@ static int udplite_v4_get_port(struct so
static int udplite_rcv(struct sk_buff *skb)
{
- if (skb->dev->nd_net != &init_net) {
- kfree_skb(skb);
- return 0;
- }
return __udp4_lib_rcv(skb, udplite_hash, IPPROTO_UDPLITE);
}
static void udplite_err(struct sk_buff *skb, u32 info)
{
- if (skb->dev->nd_net != &init_net)
- return;
-
return __udp4_lib_err(skb, info, udplite_hash);
}
@@ -83,7 +76,7 @@ static struct inet_protosw udplite4_prot
.ops = &inet_dgram_ops,
.capability = -1,
.no_check = 0, /* must checksum (RFC 3828) */
- .flags = INET_PROTOSW_PERMANENT,
+ .flags = INET_PROTOSW_PERMANENT | INET_PROTOSW_NETNS,
};
#ifdef CONFIG_PROC_FS
@@ -99,9 +92,6 @@ static struct udp_seq_afinfo udplite4_se
static int udplite4_proc_net_init(struct net *net)
{
- if (net != &init_net)
- return -EPERM;
-
if (udp_proc_register(net, &udplite4_seq_afinfo)) /* udplite4_proc_init() */
printk(KERN_ERR "%s: Cannot register /proc!\n", __FUNCTION__);
--
More information about the Containers
mailing list