aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
authorDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-05 08:59:37 -0400
committerDavid Woodhouse <dwmw2@shinybook.infradead.org>2005-05-05 08:59:37 -0400
commitbfd4bda097f8758d28e632ff2035e25577f6b060 (patch)
tree022276b3625a432c7132e39776e7e448445087ac /net/decnet
parent488f2eaca1b0831a5a5e6a66e33bad2cdeff7238 (diff)
parentb2d84f078a8be40f5ae3b4d2ac001e2a7f45fe4f (diff)
Merge with master.kernel.org:/pub/scm/linux/kernel/git/torvalds/linux-2.6.git
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/dn_dev.c25
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c3
2 files changed, 15 insertions, 13 deletions
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index c2a0346f423b..e6e23eb14428 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -1411,21 +1411,22 @@ static struct file_operations dn_dev_seq_fops = {
1411 1411
1412#endif /* CONFIG_PROC_FS */ 1412#endif /* CONFIG_PROC_FS */
1413 1413
1414static struct rtnetlink_link dnet_rtnetlink_table[RTM_MAX-RTM_BASE+1] = 1414static struct rtnetlink_link dnet_rtnetlink_table[RTM_NR_MSGTYPES] =
1415{ 1415{
1416 [4] = { .doit = dn_dev_rtm_newaddr, }, 1416 [RTM_NEWADDR - RTM_BASE] = { .doit = dn_dev_rtm_newaddr, },
1417 [5] = { .doit = dn_dev_rtm_deladdr, }, 1417 [RTM_DELADDR - RTM_BASE] = { .doit = dn_dev_rtm_deladdr, },
1418 [6] = { .dumpit = dn_dev_dump_ifaddr, }, 1418 [RTM_GETADDR - RTM_BASE] = { .dumpit = dn_dev_dump_ifaddr, },
1419
1420#ifdef CONFIG_DECNET_ROUTER 1419#ifdef CONFIG_DECNET_ROUTER
1421 [8] = { .doit = dn_fib_rtm_newroute, }, 1420 [RTM_NEWROUTE - RTM_BASE] = { .doit = dn_fib_rtm_newroute, },
1422 [9] = { .doit = dn_fib_rtm_delroute, }, 1421 [RTM_DELROUTE - RTM_BASE] = { .doit = dn_fib_rtm_delroute, },
1423 [10] = { .doit = dn_cache_getroute, .dumpit = dn_fib_dump, }, 1422 [RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
1424 [16] = { .doit = dn_fib_rtm_newrule, }, 1423 .dumpit = dn_fib_dump, },
1425 [17] = { .doit = dn_fib_rtm_delrule, }, 1424 [RTM_NEWRULE - RTM_BASE] = { .doit = dn_fib_rtm_newrule, },
1426 [18] = { .dumpit = dn_fib_dump_rules, }, 1425 [RTM_DELRULE - RTM_BASE] = { .doit = dn_fib_rtm_delrule, },
1426 [RTM_GETRULE - RTM_BASE] = { .dumpit = dn_fib_dump_rules, },
1427#else 1427#else
1428 [10] = { .doit = dn_cache_getroute, .dumpit = dn_cache_dump, }, 1428 [RTM_GETROUTE - RTM_BASE] = { .doit = dn_cache_getroute,
1429 .dumpit = dn_cache_dump,
1429#endif 1430#endif
1430 1431
1431}; 1432};
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index f86a6259fd12..284a9998e53d 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -119,8 +119,9 @@ static inline void dnrmg_receive_user_skb(struct sk_buff *skb)
119static void dnrmg_receive_user_sk(struct sock *sk, int len) 119static void dnrmg_receive_user_sk(struct sock *sk, int len)
120{ 120{
121 struct sk_buff *skb; 121 struct sk_buff *skb;
122 unsigned int qlen = skb_queue_len(&sk->sk_receive_queue);
122 123
123 while((skb = skb_dequeue(&sk->sk_receive_queue)) != NULL) { 124 for (; qlen && (skb = skb_dequeue(&sk->sk_receive_queue)); qlen--) {
124 dnrmg_receive_user_skb(skb); 125 dnrmg_receive_user_skb(skb);
125 kfree_skb(skb); 126 kfree_skb(skb);
126 } 127 }