aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 00:32:39 -0400
committerDavid S. Miller <davem@sunset.davemloft.net>2007-10-11 00:32:39 -0400
commit28f7b0360f46eeb9eeee63d03bb5484918a54837 (patch)
tree2d2fb593e5cc0a073596616e3588b3f964534f03
parent31910575a9de61e78065e93846e8e7a4894a18bf (diff)
[NETLINK]: fib_frontend build fixes
1) fibnl needs to be declared outside of config ifdefs, and also should not be explicitly initialized to NULL 2) nl_fib_input() args are wrong for netlink_kernel_create() input method Signed-off-by: David S. Miller <davem@davemloft.net>
-rw-r--r--net/ipv4/fib_frontend.c16
1 files changed, 5 insertions, 11 deletions
diff --git a/net/ipv4/fib_frontend.c b/net/ipv4/fib_frontend.c
index a5cba2349605..78b514ba1414 100644
--- a/net/ipv4/fib_frontend.c
+++ b/net/ipv4/fib_frontend.c
@@ -49,6 +49,8 @@
49 49
50#define FFprint(a...) printk(KERN_DEBUG a) 50#define FFprint(a...) printk(KERN_DEBUG a)
51 51
52static struct sock *fibnl;
53
52#ifndef CONFIG_IP_MULTIPLE_TABLES 54#ifndef CONFIG_IP_MULTIPLE_TABLES
53 55
54struct fib_table *ip_fib_local_table; 56struct fib_table *ip_fib_local_table;
@@ -62,9 +64,6 @@ static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
62#define FIB_TABLE_HASHSZ 256 64#define FIB_TABLE_HASHSZ 256
63static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ]; 65static struct hlist_head fib_table_hash[FIB_TABLE_HASHSZ];
64 66
65static struct sock *fibnl = NULL;
66
67
68struct fib_table *fib_new_table(u32 id) 67struct fib_table *fib_new_table(u32 id)
69{ 68{
70 struct fib_table *tb; 69 struct fib_table *tb;
@@ -787,17 +786,12 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
787 } 786 }
788} 787}
789 788
790static void nl_fib_input(struct sock *sk, int len) 789static void nl_fib_input(struct sk_buff *skb)
791{ 790{
792 struct sk_buff *skb = NULL;
793 struct nlmsghdr *nlh = NULL;
794 struct fib_result_nl *frn; 791 struct fib_result_nl *frn;
795 u32 pid; 792 struct nlmsghdr *nlh;
796 struct fib_table *tb; 793 struct fib_table *tb;
797 794 u32 pid;
798 skb = skb_dequeue(&sk->sk_receive_queue);
799 if (skb == NULL)
800 return;
801 795
802 nlh = nlmsg_hdr(skb); 796 nlh = nlmsg_hdr(skb);
803 if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len || 797 if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||