aboutsummaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/af_decnet.c6
-rw-r--r--net/decnet/dn_dev.c8
-rw-r--r--net/decnet/dn_nsp_in.c2
-rw-r--r--net/decnet/dn_nsp_out.c2
-rw-r--r--net/decnet/dn_route.c2
-rw-r--r--net/decnet/dn_table.c6
-rw-r--r--net/decnet/netfilter/dn_rtmsg.c11
7 files changed, 20 insertions, 17 deletions
diff --git a/net/decnet/af_decnet.c b/net/decnet/af_decnet.c
index acdd18e6adb2..621680f127af 100644
--- a/net/decnet/af_decnet.c
+++ b/net/decnet/af_decnet.c
@@ -118,7 +118,7 @@ Version 0.0.6 2.1.110 07-aug-98 Eduardo Marcelo Serrat
118#include <linux/netfilter.h> 118#include <linux/netfilter.h>
119#include <linux/seq_file.h> 119#include <linux/seq_file.h>
120#include <net/sock.h> 120#include <net/sock.h>
121#include <net/tcp.h> 121#include <net/tcp_states.h>
122#include <net/flow.h> 122#include <net/flow.h>
123#include <asm/system.h> 123#include <asm/system.h>
124#include <asm/ioctls.h> 124#include <asm/ioctls.h>
@@ -1763,7 +1763,7 @@ static int dn_recvmsg(struct kiocb *iocb, struct socket *sock,
1763 nskb = skb->next; 1763 nskb = skb->next;
1764 1764
1765 if (skb->len == 0) { 1765 if (skb->len == 0) {
1766 skb_unlink(skb); 1766 skb_unlink(skb, queue);
1767 kfree_skb(skb); 1767 kfree_skb(skb);
1768 /* 1768 /*
1769 * N.B. Don't refer to skb or cb after this point 1769 * N.B. Don't refer to skb or cb after this point
@@ -2064,7 +2064,7 @@ static struct notifier_block dn_dev_notifier = {
2064 .notifier_call = dn_device_event, 2064 .notifier_call = dn_device_event,
2065}; 2065};
2066 2066
2067extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *); 2067extern int dn_route_rcv(struct sk_buff *, struct net_device *, struct packet_type *, struct net_device *);
2068 2068
2069static struct packet_type dn_dix_packet_type = { 2069static struct packet_type dn_dix_packet_type = {
2070 .type = __constant_htons(ETH_P_DNA_RT), 2070 .type = __constant_htons(ETH_P_DNA_RT),
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 00233ecbc9cb..5610bb16dbf9 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -752,16 +752,16 @@ static void rtmsg_ifa(int event, struct dn_ifaddr *ifa)
752 752
753 skb = alloc_skb(size, GFP_KERNEL); 753 skb = alloc_skb(size, GFP_KERNEL);
754 if (!skb) { 754 if (!skb) {
755 netlink_set_err(rtnl, 0, RTMGRP_DECnet_IFADDR, ENOBUFS); 755 netlink_set_err(rtnl, 0, RTNLGRP_DECnet_IFADDR, ENOBUFS);
756 return; 756 return;
757 } 757 }
758 if (dn_dev_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) { 758 if (dn_dev_fill_ifaddr(skb, ifa, 0, 0, event, 0) < 0) {
759 kfree_skb(skb); 759 kfree_skb(skb);
760 netlink_set_err(rtnl, 0, RTMGRP_DECnet_IFADDR, EINVAL); 760 netlink_set_err(rtnl, 0, RTNLGRP_DECnet_IFADDR, EINVAL);
761 return; 761 return;
762 } 762 }
763 NETLINK_CB(skb).dst_groups = RTMGRP_DECnet_IFADDR; 763 NETLINK_CB(skb).dst_group = RTNLGRP_DECnet_IFADDR;
764 netlink_broadcast(rtnl, skb, 0, RTMGRP_DECnet_IFADDR, GFP_KERNEL); 764 netlink_broadcast(rtnl, skb, 0, RTNLGRP_DECnet_IFADDR, GFP_KERNEL);
765} 765}
766 766
767static int dn_dev_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb) 767static int dn_dev_dump_ifaddr(struct sk_buff *skb, struct netlink_callback *cb)
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index 202dbde9850d..369f25b60f3f 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -60,7 +60,7 @@
60#include <linux/inet.h> 60#include <linux/inet.h>
61#include <linux/route.h> 61#include <linux/route.h>
62#include <net/sock.h> 62#include <net/sock.h>
63#include <net/tcp.h> 63#include <net/tcp_states.h>
64#include <asm/system.h> 64#include <asm/system.h>
65#include <linux/fcntl.h> 65#include <linux/fcntl.h>
66#include <linux/mm.h> 66#include <linux/mm.h>
diff --git a/net/decnet/dn_nsp_out.c b/net/decnet/dn_nsp_out.c
index 8cce1fdbda90..e0bebf4bbcad 100644
--- a/net/decnet/dn_nsp_out.c
+++ b/net/decnet/dn_nsp_out.c
@@ -479,7 +479,7 @@ int dn_nsp_check_xmit_queue(struct sock *sk, struct sk_buff *skb, struct sk_buff
479 xmit_count = cb2->xmit_count; 479 xmit_count = cb2->xmit_count;
480 segnum = cb2->segnum; 480 segnum = cb2->segnum;
481 /* Remove and drop ack'ed packet */ 481 /* Remove and drop ack'ed packet */
482 skb_unlink(ack); 482 skb_unlink(ack, q);
483 kfree_skb(ack); 483 kfree_skb(ack);
484 ack = NULL; 484 ack = NULL;
485 485
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 2399fa8a3f86..2c915f305be3 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -572,7 +572,7 @@ static int dn_route_ptp_hello(struct sk_buff *skb)
572 return NET_RX_SUCCESS; 572 return NET_RX_SUCCESS;
573} 573}
574 574
575int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt) 575int dn_route_rcv(struct sk_buff *skb, struct net_device *dev, struct packet_type *pt, struct net_device *orig_dev)
576{ 576{
577 struct dn_skb_cb *cb; 577 struct dn_skb_cb *cb;
578 unsigned char flags = 0; 578 unsigned char flags = 0;
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index 28ba5777a25a..eeba56f99323 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -79,7 +79,7 @@ for( ; ((f) = *(fp)) != NULL && dn_key_eq((f)->fn_key, (key)); (fp) = &(f)->fn_n
79static DEFINE_RWLOCK(dn_fib_tables_lock); 79static DEFINE_RWLOCK(dn_fib_tables_lock);
80struct dn_fib_table *dn_fib_tables[RT_TABLE_MAX + 1]; 80struct dn_fib_table *dn_fib_tables[RT_TABLE_MAX + 1];
81 81
82static kmem_cache_t *dn_hash_kmem; 82static kmem_cache_t *dn_hash_kmem __read_mostly;
83static int dn_fib_hash_zombies; 83static int dn_fib_hash_zombies;
84 84
85static inline dn_fib_idx_t dn_hash(dn_fib_key_t key, struct dn_zone *dz) 85static inline dn_fib_idx_t dn_hash(dn_fib_key_t key, struct dn_zone *dz)
@@ -349,10 +349,10 @@ static void dn_rtmsg_fib(int event, struct dn_fib_node *f, int z, int tb_id,
349 kfree_skb(skb); 349 kfree_skb(skb);
350 return; 350 return;
351 } 351 }
352 NETLINK_CB(skb).dst_groups = RTMGRP_DECnet_ROUTE; 352 NETLINK_CB(skb).dst_group = RTNLGRP_DECnet_ROUTE;
353 if (nlh->nlmsg_flags & NLM_F_ECHO) 353 if (nlh->nlmsg_flags & NLM_F_ECHO)
354 atomic_inc(&skb->users); 354 atomic_inc(&skb->users);
355 netlink_broadcast(rtnl, skb, pid, RTMGRP_DECnet_ROUTE, GFP_KERNEL); 355 netlink_broadcast(rtnl, skb, pid, RTNLGRP_DECnet_ROUTE, GFP_KERNEL);
356 if (nlh->nlmsg_flags & NLM_F_ECHO) 356 if (nlh->nlmsg_flags & NLM_F_ECHO)
357 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT); 357 netlink_unicast(rtnl, skb, pid, MSG_DONTWAIT);
358} 358}
diff --git a/net/decnet/netfilter/dn_rtmsg.c b/net/decnet/netfilter/dn_rtmsg.c
index 284a9998e53d..1ab94c6e22ed 100644
--- a/net/decnet/netfilter/dn_rtmsg.c
+++ b/net/decnet/netfilter/dn_rtmsg.c
@@ -19,6 +19,7 @@
19#include <linux/netfilter.h> 19#include <linux/netfilter.h>
20#include <linux/spinlock.h> 20#include <linux/spinlock.h>
21#include <linux/netlink.h> 21#include <linux/netlink.h>
22#include <linux/netfilter_decnet.h>
22 23
23#include <net/sock.h> 24#include <net/sock.h>
24#include <net/flow.h> 25#include <net/flow.h>
@@ -71,10 +72,10 @@ static void dnrmg_send_peer(struct sk_buff *skb)
71 72
72 switch(flags & DN_RT_CNTL_MSK) { 73 switch(flags & DN_RT_CNTL_MSK) {
73 case DN_RT_PKT_L1RT: 74 case DN_RT_PKT_L1RT:
74 group = DNRMG_L1_GROUP; 75 group = DNRNG_NLGRP_L1;
75 break; 76 break;
76 case DN_RT_PKT_L2RT: 77 case DN_RT_PKT_L2RT:
77 group = DNRMG_L2_GROUP; 78 group = DNRNG_NLGRP_L2;
78 break; 79 break;
79 default: 80 default:
80 return; 81 return;
@@ -83,7 +84,7 @@ static void dnrmg_send_peer(struct sk_buff *skb)
83 skb2 = dnrmg_build_message(skb, &status); 84 skb2 = dnrmg_build_message(skb, &status);
84 if (skb2 == NULL) 85 if (skb2 == NULL)
85 return; 86 return;
86 NETLINK_CB(skb2).dst_groups = group; 87 NETLINK_CB(skb2).dst_group = group;
87 netlink_broadcast(dnrmg, skb2, 0, group, GFP_ATOMIC); 88 netlink_broadcast(dnrmg, skb2, 0, group, GFP_ATOMIC);
88} 89}
89 90
@@ -138,7 +139,8 @@ static int __init init(void)
138{ 139{
139 int rv = 0; 140 int rv = 0;
140 141
141 dnrmg = netlink_kernel_create(NETLINK_DNRTMSG, dnrmg_receive_user_sk); 142 dnrmg = netlink_kernel_create(NETLINK_DNRTMSG, DNRNG_NLGRP_MAX,
143 dnrmg_receive_user_sk, THIS_MODULE);
142 if (dnrmg == NULL) { 144 if (dnrmg == NULL) {
143 printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket"); 145 printk(KERN_ERR "dn_rtmsg: Cannot create netlink socket");
144 return -ENOMEM; 146 return -ENOMEM;
@@ -162,6 +164,7 @@ static void __exit fini(void)
162MODULE_DESCRIPTION("DECnet Routing Message Grabulator"); 164MODULE_DESCRIPTION("DECnet Routing Message Grabulator");
163MODULE_AUTHOR("Steven Whitehouse <steve@chygwyn.com>"); 165MODULE_AUTHOR("Steven Whitehouse <steve@chygwyn.com>");
164MODULE_LICENSE("GPL"); 166MODULE_LICENSE("GPL");
167MODULE_ALIAS_NET_PF_PROTO(PF_NETLINK, NETLINK_DNRTMSG);
165 168
166module_init(init); 169module_init(init);
167module_exit(fini); 170module_exit(fini);