Gitweb: http://git.kernel.org/git/?p=linux/kernel/git/torvalds/linux-2.6.git;a=commit;h=340d17fc9d577c93678850e46963e9b19b92db7e Commit: 340d17fc9d577c93678850e46963e9b19b92db7e Parent: e284986385b6420a5f30f2dcd743512bbe1a3202 Author: Thomas Graf <[EMAIL PROTECTED]> AuthorDate: Thu Mar 22 11:49:22 2007 -0700 Committer: David S. Miller <[EMAIL PROTECTED]> CommitDate: Wed Apr 25 22:27:05 2007 -0700
[NET] link: Use rtnl registration interface Signed-off-by: Thomas Graf <[EMAIL PROTECTED]> Signed-off-by: David S. Miller <[EMAIL PROTECTED]> --- net/core/rtnetlink.c | 8 +++----- 1 files changed, 3 insertions(+), 5 deletions(-) diff --git a/net/core/rtnetlink.c b/net/core/rtnetlink.c index fb1630d..8351373 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c @@ -961,9 +961,6 @@ static void rtnetlink_rcv(struct sock *sk, int len) static struct rtnetlink_link link_rtnetlink_table[RTM_NR_MSGTYPES] = { - [RTM_GETLINK - RTM_BASE] = { .doit = rtnl_getlink, - .dumpit = rtnl_dump_ifinfo }, - [RTM_SETLINK - RTM_BASE] = { .doit = rtnl_setlink }, [RTM_GETADDR - RTM_BASE] = { .dumpit = rtnl_dump_all }, [RTM_GETROUTE - RTM_BASE] = { .dumpit = rtnl_dump_all }, [RTM_NEWNEIGH - RTM_BASE] = { .doit = neigh_add }, @@ -1024,8 +1021,9 @@ void __init rtnetlink_init(void) panic("rtnetlink_init: cannot initialize rtnetlink\n"); netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV); register_netdevice_notifier(&rtnetlink_dev_notifier); - rtnetlink_links[PF_UNSPEC] = link_rtnetlink_table; - rtnetlink_links[PF_PACKET] = link_rtnetlink_table; + + rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink, rtnl_dump_ifinfo); + rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL); } EXPORT_SYMBOL(__rta_fill); - To unsubscribe from this list: send the line "unsubscribe git-commits-head" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html