Commit 51057f2f authored by Thomas Graf's avatar Thomas Graf Committed by David S. Miller

[RTNL]: Properly return rntl message handler

Signed-off-by: default avatarThomas Graf <tgraf@suug.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1936502d
...@@ -122,10 +122,10 @@ static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex) ...@@ -122,10 +122,10 @@ static rtnl_doit_func rtnl_get_doit(int protocol, int msgindex)
struct rtnl_link *tab; struct rtnl_link *tab;
tab = rtnl_msg_handlers[protocol]; tab = rtnl_msg_handlers[protocol];
if (tab == NULL || tab->doit == NULL) if (tab == NULL || tab[msgindex].doit == NULL)
tab = rtnl_msg_handlers[PF_UNSPEC]; 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) 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) ...@@ -133,10 +133,10 @@ static rtnl_dumpit_func rtnl_get_dumpit(int protocol, int msgindex)
struct rtnl_link *tab; struct rtnl_link *tab;
tab = rtnl_msg_handlers[protocol]; tab = rtnl_msg_handlers[protocol];
if (tab == NULL || tab->dumpit == NULL) if (tab == NULL || tab[msgindex].dumpit == NULL)
tab = rtnl_msg_handlers[PF_UNSPEC]; tab = rtnl_msg_handlers[PF_UNSPEC];
return tab ? tab->dumpit : NULL; return tab ? tab[msgindex].dumpit : NULL;
} }
/** /**
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment