aboutsummaryrefslogtreecommitdiffstats
path: root/net/ipv4/fib_frontend.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/fib_frontend.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/fib_frontend.c')
-rw-r--r--net/ipv4/fib_frontend.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index 3ff753c6f197..5bf718a3e49b 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -34,7 +34,6 @@
34#include <linux/if_addr.h> 34#include <linux/if_addr.h>
35#include <linux/if_arp.h> 35#include <linux/if_arp.h>
36#include <linux/skbuff.h> 36#include <linux/skbuff.h>
37#include <linux/netlink.h>
38#include <linux/init.h> 37#include <linux/init.h>
39#include <linux/list.h> 38#include <linux/list.h>
40 39
@@ -46,6 +45,7 @@
46#include <net/icmp.h> 45#include <net/icmp.h>
47#include <net/arp.h> 46#include <net/arp.h>
48#include <net/ip_fib.h> 47#include <net/ip_fib.h>
48#include <net/rtnetlink.h>
49 49
50#define FFprint(a...) printk(KERN_DEBUG a) 50#define FFprint(a...) printk(KERN_DEBUG a)
51 51
@@ -540,7 +540,7 @@ errout:
540 return err; 540 return err;
541} 541}
542 542
543int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 543static int inet_rtm_delroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
544{ 544{
545 struct fib_config cfg; 545 struct fib_config cfg;
546 struct fib_table *tb; 546 struct fib_table *tb;
@@ -561,7 +561,7 @@ errout:
561 return err; 561 return err;
562} 562}
563 563
564int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg) 564static int inet_rtm_newroute(struct sk_buff *skb, struct nlmsghdr* nlh, void *arg)
565{ 565{
566 struct fib_config cfg; 566 struct fib_config cfg;
567 struct fib_table *tb; 567 struct fib_table *tb;
@@ -582,7 +582,7 @@ errout:
582 return err; 582 return err;
583} 583}
584 584
585int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb) 585static int inet_dump_fib(struct sk_buff *skb, struct netlink_callback *cb)
586{ 586{
587 unsigned int h, s_h; 587 unsigned int h, s_h;
588 unsigned int e = 0, s_e; 588 unsigned int e = 0, s_e;
@@ -925,6 +925,10 @@ void __init ip_fib_init(void)
925 register_netdevice_notifier(&fib_netdev_notifier); 925 register_netdevice_notifier(&fib_netdev_notifier);
926 register_inetaddr_notifier(&fib_inetaddr_notifier); 926 register_inetaddr_notifier(&fib_inetaddr_notifier);
927 nl_fib_lookup_init(); 927 nl_fib_lookup_init();
928
929 rtnl_register(PF_INET, RTM_NEWROUTE, inet_rtm_newroute, NULL);
930 rtnl_register(PF_INET, RTM_DELROUTE, inet_rtm_delroute, NULL);
931 rtnl_register(PF_INET, RTM_GETROUTE, NULL, inet_dump_fib);
928} 932}
929 933
930EXPORT_SYMBOL(inet_addr_type); 934EXPORT_SYMBOL(inet_addr_type);