This patch activates the udplite protocol for multiple
network namespaces.

Signed-off-by: Daniel Lezcano <[EMAIL PROTECTED]>

---
 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__);
 

-- 
_______________________________________________
Containers mailing list
[EMAIL PROTECTED]
https://lists.linux-foundation.org/mailman/listinfo/containers

_______________________________________________
Devel mailing list
[email protected]
https://openvz.org/mailman/listinfo/devel

Reply via email to