]> pilppa.com Git - linux-2.6-omap-h63xx.git/commitdiff
[NET] link: Use rtnl registration interface
authorThomas Graf <tgraf@suug.ch>
Thu, 22 Mar 2007 18:49:22 +0000 (11:49 -0700)
committerDavid S. Miller <davem@sunset.davemloft.net>
Thu, 26 Apr 2007 05:27:05 +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 fb1630d82dd455d6f6a530d5e38d32c6b68a760b..835137320001f5764a3cf1e905615d29366b43c6 100644 (file)
@@ -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);