diff options
Diffstat (limited to 'net/ipv4/raw.c')
-rw-r--r-- | net/ipv4/raw.c | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/net/ipv4/raw.c b/net/ipv4/raw.c index 53ddebc292b6..dd44e0ab600c 100644 --- a/net/ipv4/raw.c +++ b/net/ipv4/raw.c | |||
@@ -111,9 +111,7 @@ EXPORT_SYMBOL_GPL(raw_unhash_sk); | |||
111 | static struct sock *__raw_v4_lookup(struct net *net, struct sock *sk, | 111 | static struct sock *__raw_v4_lookup(struct net *net, struct sock *sk, |
112 | unsigned short num, __be32 raddr, __be32 laddr, int dif) | 112 | unsigned short num, __be32 raddr, __be32 laddr, int dif) |
113 | { | 113 | { |
114 | struct hlist_node *node; | 114 | sk_for_each_from(sk) { |
115 | |||
116 | sk_for_each_from(sk, node) { | ||
117 | struct inet_sock *inet = inet_sk(sk); | 115 | struct inet_sock *inet = inet_sk(sk); |
118 | 116 | ||
119 | if (net_eq(sock_net(sk), net) && inet->inet_num == num && | 117 | if (net_eq(sock_net(sk), net) && inet->inet_num == num && |
@@ -914,9 +912,7 @@ static struct sock *raw_get_first(struct seq_file *seq) | |||
914 | 912 | ||
915 | for (state->bucket = 0; state->bucket < RAW_HTABLE_SIZE; | 913 | for (state->bucket = 0; state->bucket < RAW_HTABLE_SIZE; |
916 | ++state->bucket) { | 914 | ++state->bucket) { |
917 | struct hlist_node *node; | 915 | sk_for_each(sk, &state->h->ht[state->bucket]) |
918 | |||
919 | sk_for_each(sk, node, &state->h->ht[state->bucket]) | ||
920 | if (sock_net(sk) == seq_file_net(seq)) | 916 | if (sock_net(sk) == seq_file_net(seq)) |
921 | goto found; | 917 | goto found; |
922 | } | 918 | } |