summaryrefslogtreecommitdiff
path: root/net/decnet/dn_route.c
diff options
context:
space:
mode:
authorThomas Graf <tgraf@suug.ch>2007-03-22 11:57:46 -0700
committerDavid S. Miller <davem@sunset.davemloft.net>2007-04-25 22:27:12 -0700
commitfa34ddd739cecf3999ec0b7562618e8321829d41 (patch)
treeddc3534b56faca48077922cddbbb79e9b5b0c1ea /net/decnet/dn_route.c
parent708914cc5e1657eb1a1f9eefc6333dfd2df8c73a (diff)
[DECNet]: Use rtnl registration interface
Signed-off-by: Thomas Graf <tgraf@suug.ch> Acked-by: Steven Whitehouse <swhiteho@redhat.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/decnet/dn_route.c')
-rw-r--r--net/decnet/dn_route.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 2ae35ef1f077..5d7337bcf0fe 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1522,7 +1522,7 @@ rtattr_failure:
/*
* This is called by both endnodes and routers now.
*/
-int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg)
+static int dn_cache_getroute(struct sk_buff *in_skb, struct nlmsghdr *nlh, void *arg)
{
struct rtattr **rta = arg;
struct rtmsg *rtm = NLMSG_DATA(nlh);
@@ -1813,6 +1813,13 @@ void __init dn_route_init(void)
dn_dst_ops.gc_thresh = (dn_rt_hash_mask + 1);
proc_net_fops_create("decnet_cache", S_IRUGO, &dn_rt_cache_seq_fops);
+
+#ifdef CONFIG_DECNET_ROUTER
+ rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute, dn_fib_dump);
+#else
+ rtnl_register(PF_DECnet, RTM_GETROUTE, dn_cache_getroute,
+ dn_cache_dump);
+#endif
}
void __exit dn_route_cleanup(void)