[DECNet]: Use rtnl registration interface
[deliverable/linux.git] / net / decnet / dn_route.c
index 2ae35ef1f077c00a7165ea6003e26308a82d1356..5d7337bcf0fecde048d6916ac33f9919a72f5a41 100644 (file)
@@ -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)
This page took 0.041794 seconds and 5 git commands to generate.