a5e0996a730a9bad0b75b5a23d359d342d237423
[linux-2.6.git] / linux-2.6-710-disable-vserver-check-for-ns-devices.patch
1 diff -Nurb linux-2.6.27.10-clickport/net/core/dev.c trellis2/net/core/dev.c
2 --- linux-2.6.27.10-clickport/net/core/dev.c    2009-01-27 16:02:45.000000000 -0500
3 +++ trellis2/net/core/dev.c     2009-02-12 11:00:46.000000000 -0500
4 @@ -2559,7 +2559,7 @@
5  
6         total = 0;
7         for_each_netdev(net, dev) {
8 -               if (!nx_dev_visible(current->nx_info, dev))
9 +               if (net==&init_dev && !nx_dev_visible(current->nx_info, dev))
10                         continue;
11                 for (i = 0; i < NPROTO; i++) {
12                         if (gifconf_list[i]) {
13 @@ -2628,8 +2628,9 @@
14  static void dev_seq_printf_stats(struct seq_file *seq, struct net_device *dev)
15  {
16         struct net_device_stats *stats = dev->get_stats(dev);
17 +    struct net *net = seq->private;
18  
19 -       if (!nx_dev_visible(current->nx_info, dev))
20 +       if (net==&init_net && !nx_dev_visible(current->nx_info, dev))
21                 return;
22  
23         seq_printf(seq, "%6s:%8lu %7lu %4lu %4lu %4lu %5lu %10lu %9lu "