]> err.no Git - linux-2.6/blobdiff - net/ipv4/fib_frontend.c
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/drzeus/mmc
[linux-2.6] / net / ipv4 / fib_frontend.c
index f823ca34cb12fd691e7e2ccbdf13fa59cf5bf478..78b514ba1414a8ebd22b0b0a423110b61b6326ce 100644 (file)
@@ -49,6 +49,8 @@
 
 #define FFprint(a...) printk(KERN_DEBUG a)
 
+static struct sock *fibnl;
+
 #ifndef CONFIG_IP_MULTIPLE_TABLES
 
 struct fib_table *ip_fib_local_table;
@@ -784,17 +786,12 @@ static void nl_fib_lookup(struct fib_result_nl *frn, struct fib_table *tb )
        }
 }
 
-static void nl_fib_input(struct sock *sk, int len)
+static void nl_fib_input(struct sk_buff *skb)
 {
-       struct sk_buff *skb = NULL;
-       struct nlmsghdr *nlh = NULL;
        struct fib_result_nl *frn;
-       u32 pid;
+       struct nlmsghdr *nlh;
        struct fib_table *tb;
-
-       skb = skb_dequeue(&sk->sk_receive_queue);
-       if (skb == NULL)
-               return;
+       u32 pid;
 
        nlh = nlmsg_hdr(skb);
        if (skb->len < NLMSG_SPACE(0) || skb->len < nlh->nlmsg_len ||
@@ -811,13 +808,13 @@ static void nl_fib_input(struct sock *sk, int len)
        pid = NETLINK_CB(skb).pid;       /* pid of sending process */
        NETLINK_CB(skb).pid = 0;         /* from kernel */
        NETLINK_CB(skb).dst_group = 0;  /* unicast */
-       netlink_unicast(sk, skb, pid, MSG_DONTWAIT);
+       netlink_unicast(fibnl, skb, pid, MSG_DONTWAIT);
 }
 
 static void nl_fib_lookup_init(void)
 {
-       netlink_kernel_create(&init_net, NETLINK_FIB_LOOKUP, 0, nl_fib_input,
-                               NULL, THIS_MODULE);
+       fibnl = netlink_kernel_create(&init_net, NETLINK_FIB_LOOKUP, 0,
+                                     nl_fib_input, NULL, THIS_MODULE);
 }
 
 static void fib_disable_ip(struct net_device *dev, int force)