[openib-general] [PATCH] SDP: In sdp_link.c::do_link_path_lookup, handle interface table numbering holes

Hal Rosenstock halr at voltaire.com
Fri Sep 30 07:38:31 PDT 2005


SDP: In sdp_link.c::do_link_path_lookup, handle interface table
numbering holes
(similar to James Lentini's patch to at.c)

(this is untested)

Signed-off-by: Hal Rosenstock <halr at voltaire.com>

Index: sdp_link.c
===================================================================
--- sdp_link.c  (revision 3623)
+++ sdp_link.c  (working copy)
@@ -354,7 +354,6 @@ static void do_link_path_lookup(struct s
        struct ipoib_dev_priv *priv;
        struct net_device *dev = NULL;
        struct rtable *rt;
-       int counter = 0;
        int result = 0;
        struct flowi fl = {
                .oif = info->dif, /* oif */
@@ -435,7 +434,7 @@ static void do_link_path_lookup(struct s
 
        if (dev->flags & IFF_LOOPBACK) {
                dev_put(dev);
-               while ((dev = dev_get_by_index(++counter))) {
+               for (dev = dev_base; dev; dev = dev->next) {
                        if (dev->type == ARPHRD_INFINIBAND &&
                            (dev->flags & IFF_UP))
                                break;





More information about the general mailing list