[RTNL]: Properly return rntl message handler
authorThomas Graf <tgraf@suug.ch>
Fri, 23 Mar 2007 04:41:06 +0000 (21:41 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:24 +0000 (22:27 -0700)
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/core/rtnetlink.c

index 294c2f2..4398cb8 100644 (file)
@@ -122,10 +122,10 @@ static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex)
        struct rtnl_link *tab;
 
        tab = rtnl_msg_handlers[protocol];
-       if (tab == NULL || tab->doit == NULL)
+       if (tab == NULL || tab[msgindex].doit == NULL)
                tab = rtnl_msg_handlers[PF_UNSPEC];
 
-       return tab ? tab->doit : NULL;
+       return tab ? tab[msgindex].doit : NULL;
 }
 
 static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
@@ -133,10 +133,10 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
        struct rtnl_link *tab;
 
        tab = rtnl_msg_handlers[protocol];
-       if (tab == NULL || tab->dumpit == NULL)
+       if (tab == NULL || tab[msgindex].dumpit == NULL)
                tab = rtnl_msg_handlers[PF_UNSPEC];
 
-       return tab ? tab->dumpit : NULL;
+       return tab ? tab[msgindex].dumpit : NULL;
 }
 
 /**