]> git.karo-electronics.de Git - karo-tx-linux.git/blobdiff - net/core/neighbour.c
Merge tag 'for-linus-4.10-ofs1' of git://git.kernel.org/pub/scm/linux/kernel/git...
[karo-tx-linux.git] / net / core / neighbour.c
index 2ae929f9bd06f3be98cbd1add881641a0df1d7a4..782dd866366554e53dda3e6c69c807ec90bd0e08 100644 (file)
@@ -2291,13 +2291,10 @@ static int neigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
                for (n = rcu_dereference_bh(nht->hash_buckets[h]), idx = 0;
                     n != NULL;
                     n = rcu_dereference_bh(n->next)) {
-                       if (!net_eq(dev_net(n->dev), net))
-                               continue;
-                       if (neigh_ifindex_filtered(n->dev, filter_idx))
-                               continue;
-                       if (neigh_master_filtered(n->dev, filter_master_idx))
-                               continue;
-                       if (idx < s_idx)
+                       if (idx < s_idx || !net_eq(dev_net(n->dev), net))
+                               goto next;
+                       if (neigh_ifindex_filtered(n->dev, filter_idx) ||
+                           neigh_master_filtered(n->dev, filter_master_idx))
                                goto next;
                        if (neigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
                                            cb->nlh->nlmsg_seq,
@@ -2332,9 +2329,7 @@ static int pneigh_dump_table(struct neigh_table *tbl, struct sk_buff *skb,
                if (h > s_h)
                        s_idx = 0;
                for (n = tbl->phash_buckets[h], idx = 0; n; n = n->next) {
-                       if (pneigh_net(n) != net)
-                               continue;
-                       if (idx < s_idx)
+                       if (idx < s_idx || pneigh_net(n) != net)
                                goto next;
                        if (pneigh_fill_info(skb, n, NETLINK_CB(cb->skb).portid,
                                            cb->nlh->nlmsg_seq,