aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/devinet.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-22 14:55:17 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-26 01:27:08 -0400
commit63f3444fb9a54c024d55f1205f8b94e7d2786595 (patch)
tree41cde0c702a2b4400a34f02380eb3baf1cc72a2b /net/ipv4/devinet.c
parent9d9e6a5819230b5a5cc036f213135cb123ab1e50 (diff)
[IPv4]: 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/ipv4/devinet.c')
-rw-r--r--net/ipv4/devinet.c21
1 files changed, 5 insertions, 16 deletions
diff --git a/net/ipv4/devinet.c b/net/ipv4/devinet.c
index 043857bd151c..9bdc79564cc6 100644
--- a/net/ipv4/devinet.c
+++ b/net/ipv4/devinet.c
@@ -48,7 +48,6 @@
48#include <linux/netdevice.h> 48#include <linux/netdevice.h>
49#include <linux/etherdevice.h> 49#include <linux/etherdevice.h>
50#include <linux/skbuff.h> 50#include <linux/skbuff.h>
51#include <linux/rtnetlink.h>
52#include <linux/init.h> 51#include <linux/init.h>
53#include <linux/notifier.h> 52#include <linux/notifier.h>
54#include <linux/inetdevice.h> 53#include <linux/inetdevice.h>
@@ -62,7 +61,7 @@
62#include <net/ip.h> 61#include <net/ip.h>
63#include <net/route.h> 62#include <net/route.h>
64#include <net/ip_fib.h> 63#include <net/ip_fib.h>
65#include <net/netlink.h> 64#include <net/rtnetlink.h>
66 65
67struct ipv4_devconf ipv4_devconf = { 66struct ipv4_devconf ipv4_devconf = {
68 .accept_redirects = 1, 67 .accept_redirects = 1,
@@ -1241,19 +1240,6 @@ errout:
1241 rtnl_set_sk_err(RTNLGRP_IPV4_IFADDR, err); 1240 rtnl_set_sk_err(RTNLGRP_IPV4_IFADDR, err);
1242} 1241}
1243 1242
1244static struct rtnetlink_link inet_rtnetlink_table[RTM_NR_MSGTYPES] = {
1245 [RTM_NEWADDR - RTM_BASE] = { .doit = inet_rtm_newaddr, },
1246 [RTM_DELADDR - RTM_BASE] = { .doit = inet_rtm_deladdr, },
1247 [RTM_GETADDR - RTM_BASE] = { .dumpit = inet_dump_ifaddr, },
1248 [RTM_NEWROUTE - RTM_BASE] = { .doit = inet_rtm_newroute, },
1249 [RTM_DELROUTE - RTM_BASE] = { .doit = inet_rtm_delroute, },
1250 [RTM_GETROUTE - RTM_BASE] = { .doit = inet_rtm_getroute,
1251 .dumpit = inet_dump_fib, },
1252#ifdef CONFIG_IP_MULTIPLE_TABLES
1253 [RTM_GETRULE - RTM_BASE] = { .dumpit = fib4_rules_dump, },
1254#endif
1255};
1256
1257#ifdef CONFIG_SYSCTL 1243#ifdef CONFIG_SYSCTL
1258 1244
1259void inet_forward_change(void) 1245void inet_forward_change(void)
@@ -1636,7 +1622,10 @@ void __init devinet_init(void)
1636{ 1622{
1637 register_gifconf(PF_INET, inet_gifconf); 1623 register_gifconf(PF_INET, inet_gifconf);
1638 register_netdevice_notifier(&ip_netdev_notifier); 1624 register_netdevice_notifier(&ip_netdev_notifier);
1639 rtnetlink_links[PF_INET] = inet_rtnetlink_table; 1625
1626 rtnl_register(PF_INET, RTM_NEWADDR, inet_rtm_newaddr, NULL);
1627 rtnl_register(PF_INET, RTM_DELADDR, inet_rtm_deladdr, NULL);
1628 rtnl_register(PF_INET, RTM_GETADDR, NULL, inet_dump_ifaddr);
1640#ifdef CONFIG_SYSCTL 1629#ifdef CONFIG_SYSCTL
1641 devinet_sysctl.sysctl_header = 1630 devinet_sysctl.sysctl_header =
1642 register_sysctl_table(devinet_sysctl.devinet_root_dir); 1631 register_sysctl_table(devinet_sysctl.devinet_root_dir);