diff options
author | Thomas Graf <tgraf@suug.ch> | 2007-03-22 14:49:22 -0400 |
---|---|---|
committer | David S. Miller <davem@sunset.davemloft.net> | 2007-04-26 01:27:05 -0400 |
commit | 340d17fc9d577c93678850e46963e9b19b92db7e (patch) | |
tree | d61d706f7834409cdde9511d80004d73c80d367f /net/core | |
parent | e284986385b6420a5f30f2dcd743512bbe1a3202 (diff) |
[NET] link: Use rtnl registration interface
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/core')
-rw-r--r-- | 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 fb1630d82dd4..835137320001 100644 --- a/net/core/rtnetlink.c +++ b/net/core/rtnetlink.c | |||
@@ -961,9 +961,6 @@ static void rtnetlink_rcv(struct sock *sk, int len) | |||
961 | 961 | ||
962 | static struct rtnetlink_link link_rtnetlink_table[RTM_NR_MSGTYPES] = | 962 | static struct rtnetlink_link link_rtnetlink_table[RTM_NR_MSGTYPES] = |
963 | { | 963 | { |
964 | [RTM_GETLINK - RTM_BASE] = { .doit = rtnl_getlink, | ||
965 | .dumpit = rtnl_dump_ifinfo }, | ||
966 | [RTM_SETLINK - RTM_BASE] = { .doit = rtnl_setlink }, | ||
967 | [RTM_GETADDR - RTM_BASE] = { .dumpit = rtnl_dump_all }, | 964 | [RTM_GETADDR - RTM_BASE] = { .dumpit = rtnl_dump_all }, |
968 | [RTM_GETROUTE - RTM_BASE] = { .dumpit = rtnl_dump_all }, | 965 | [RTM_GETROUTE - RTM_BASE] = { .dumpit = rtnl_dump_all }, |
969 | [RTM_NEWNEIGH - RTM_BASE] = { .doit = neigh_add }, | 966 | [RTM_NEWNEIGH - RTM_BASE] = { .doit = neigh_add }, |
@@ -1024,8 +1021,9 @@ void __init rtnetlink_init(void) | |||
1024 | panic("rtnetlink_init: cannot initialize rtnetlink\n"); | 1021 | panic("rtnetlink_init: cannot initialize rtnetlink\n"); |
1025 | netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV); | 1022 | netlink_set_nonroot(NETLINK_ROUTE, NL_NONROOT_RECV); |
1026 | register_netdevice_notifier(&rtnetlink_dev_notifier); | 1023 | register_netdevice_notifier(&rtnetlink_dev_notifier); |
1027 | rtnetlink_links[PF_UNSPEC] = link_rtnetlink_table; | 1024 | |
1028 | rtnetlink_links[PF_PACKET] = link_rtnetlink_table; | 1025 | rtnl_register(PF_UNSPEC, RTM_GETLINK, rtnl_getlink, rtnl_dump_ifinfo); |
1026 | rtnl_register(PF_UNSPEC, RTM_SETLINK, rtnl_setlink, NULL); | ||
1029 | } | 1027 | } |
1030 | 1028 | ||
1031 | EXPORT_SYMBOL(__rta_fill); | 1029 | EXPORT_SYMBOL(__rta_fill); |