[NET] NETNS: Omit seq_net_private->net without CONFIG_NET_NS.
[linux-2.6-block.git] / net / ipv4 / raw.c
index be19a4048d7c47ec1e483ebd62c6b29bc81cf117..25dc8b38cac3b0f2dab98751b4ded507eeed993d 100644 (file)
@@ -856,7 +856,7 @@ static struct sock *raw_get_first(struct seq_file *seq)
                struct hlist_node *node;
 
                sk_for_each(sk, node, &state->h->ht[state->bucket])
-                       if (sock_net(sk) == state->p.net)
+                       if (sock_net(sk) == seq_file_net(seq))
                                goto found;
        }
        sk = NULL;
@@ -872,7 +872,7 @@ static struct sock *raw_get_next(struct seq_file *seq, struct sock *sk)
                sk = sk_next(sk);
 try_again:
                ;
-       } while (sk && sock_net(sk) != state->p.net);
+       } while (sk && sock_net(sk) != seq_file_net(seq));
 
        if (!sk && ++state->bucket < RAW_HTABLE_SIZE) {
                sk = sk_head(&state->h->ht[state->bucket]);