aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index ebb38feb4df3..f7fba7721e63 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -115,17 +115,6 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
115 RCV_SKB_FAIL(-EINVAL); 115 RCV_SKB_FAIL(-EINVAL);
116} 116}
117 117
118static void dnrmg_receive_user_sk(struct sock *sk, int len)
119{
120 struct sk_buff *skb;
121 unsigned int qlen = skb_queue_len(&sk->sk_receive_queue);
122
123 for (; qlen && (skb = skb_dequeue(&sk->sk_receive_queue)); qlen--) {
124 dnrmg_receive_user_skb(skb);
125 kfree_skb(skb);
126 }
127}
128
129static struct nf_hook_ops dnrmg_ops = { 118static struct nf_hook_ops dnrmg_ops = {
130 .hook = dnrmg_hook, 119 .hook = dnrmg_hook,
131 .pf = PF_DECnet, 120 .pf = PF_DECnet,
@@ -139,7 +128,8 @@ static int __init dn_rtmsg_init(void)
139 128
140 dnrmg = netlink_kernel_create(&init_net, 129 dnrmg = netlink_kernel_create(&init_net,
141 NETLINK_DNRTMSG, DNRNG_NLGRP_MAX, 130 NETLINK_DNRTMSG, DNRNG_NLGRP_MAX,
142 dnrmg_receive_user_sk, NULL, THIS_MODULE); 131 dnrmg_receive_user_skb,
132 NULL, THIS_MODULE);
143 if (dnrmg == NULL) { 133 if (dnrmg == NULL) {
144 printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket"); 134 printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket");
145 return -ENOMEM; 135 return -ENOMEM;