summaryrefslogtreecommitdiffstats
path: root/net/decnet
diff options
context:
space:
mode:
Diffstat (limited to 'net/decnet')
-rw-r--r--net/decnet/TODO8
-rw-r--r--net/decnet/dn_dev.c4
-rw-r--r--net/decnet/dn_nsp_in.c29
-rw-r--r--net/decnet/dn_route.c4
-rw-r--r--net/decnet/dn_table.c2
5 files changed, 29 insertions, 18 deletions
diff --git a/net/decnet/TODO b/net/decnet/TODO
index c2e8cf47b..c5e7f5cd7 100644
--- a/net/decnet/TODO
+++ b/net/decnet/TODO
@@ -61,3 +61,11 @@ Steve's quick list of things that need finishing off:
o Hello messages should be generated for each primary address on each
interface.
+ o Add more information into /proc/net/decnet and finalise the format to
+ allow DECnet support in netstat.
+
+ o Make sure that returned connect messages are generated when they should
+ be, and that the correct error messages are sent too. Ensure that the
+ conninit receiving routine does not accept conninits with parameters
+ that we cannot handle.
+
diff --git a/net/decnet/dn_dev.c b/net/decnet/dn_dev.c
index 80bf05b5f..3ab33c220 100644
--- a/net/decnet/dn_dev.c
+++ b/net/decnet/dn_dev.c
@@ -911,6 +911,7 @@ static void dn_dev_timer_func(unsigned long arg)
}
dn_dev_set_timer(dev);
+ timer_exit(&dn_db->timer);
}
static void dn_dev_set_timer(struct net_device *dev)
@@ -1010,8 +1011,7 @@ static void dn_dev_delete(struct net_device *dev)
if (dn_db == NULL)
return;
- del_timer(&dn_db->timer);
- synchronize_bh();
+ del_timer_sync(&dn_db->timer);
dn_dev_sysctl_unregister(&dn_db->parms);
diff --git a/net/decnet/dn_nsp_in.c b/net/decnet/dn_nsp_in.c
index 5603c1d1f..9cb0c6394 100644
--- a/net/decnet/dn_nsp_in.c
+++ b/net/decnet/dn_nsp_in.c
@@ -21,6 +21,8 @@
* Steve Whitehouse: Now handles returned conninit frames.
* David S. Miller: New socket locking
* Steve Whitehouse: Fixed lockup when socket filtering was enabled.
+ * Paul Koning: Fix to push CC sockets into RUN when acks are
+ * received.
*/
/******************************************************************************
@@ -400,7 +402,7 @@ out:
}
/*
- * Copy of sock_queue_rcv_skb (from sock.h) with out
+ * Copy of sock_queue_rcv_skb (from sock.h) without
* bh_lock_sock() (its already held when this is called) which
* also allows data and other data to be queued to a socket.
*/
@@ -409,7 +411,6 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
#ifdef CONFIG_FILTER
struct sk_filter *filter;
#endif
- unsigned long flags;
/* Cast skb->rcvbuf to unsigned... It's pointless, but reduces
number of warnings when compiling with -W --ANK
@@ -431,7 +432,10 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
skb_set_owner_r(skb, sk);
skb_queue_tail(queue, skb);
- read_lock_irqsave(&sk->callback_lock, flags);
+ /* This code only runs from BH or BH protected context.
+ * Therefore the plain read_lock is ok here. -DaveM
+ */
+ read_lock(&sk->callback_lock);
if (!sk->dead) {
struct socket *sock = sk->socket;
wake_up_interruptible(sk->sleep);
@@ -439,7 +443,7 @@ static __inline__ int dn_queue_skb(struct sock *sk, struct sk_buff *skb, int sig
kill_fasync(sock->fasync_list, sig,
(sig == SIGURG) ? POLL_PRI : POLL_IN);
}
- read_unlock_irqrestore(&sk->callback_lock, flags);
+ read_unlock(&sk->callback_lock);
return 0;
}
@@ -616,7 +620,6 @@ got_it:
if (sk != NULL) {
struct dn_scp *scp = &sk->protinfo.dn;
int ret;
- /* printk(KERN_DEBUG "dn_nsp_rx: Found a socket\n"); */
/* Reset backoff */
scp->nsp_rxtshift = 0;
@@ -691,6 +694,13 @@ int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb)
} else {
int other = 1;
+ /* both data and ack frames can kick a CC socket into RUN */
+ if ((scp->state == DN_CC) && !sk->dead) {
+ scp->state = DN_RUN;
+ sk->state = TCP_ESTABLISHED;
+ sk->state_change(sk);
+ }
+
if ((cb->nsp_flags & 0x1c) == 0)
other = 0;
if (cb->nsp_flags == 0x04)
@@ -706,17 +716,10 @@ int dn_nsp_backlog_rcv(struct sock *sk, struct sk_buff *skb)
/*
* If we've some sort of data here then call a
* suitable routine for dealing with it, otherwise
- * the packet is an ack and can be discarded. All
- * data frames can also kick a CC socket into RUN.
+ * the packet is an ack and can be discarded.
*/
if ((cb->nsp_flags & 0x0c) == 0) {
- if ((scp->state == DN_CC) && !sk->dead) {
- scp->state = DN_RUN;
- sk->state = TCP_ESTABLISHED;
- sk->state_change(sk);
- }
-
if (scp->state != DN_RUN)
goto free_out;
diff --git a/net/decnet/dn_route.c b/net/decnet/dn_route.c
index 6f842d465..cc2ffeeef 100644
--- a/net/decnet/dn_route.c
+++ b/net/decnet/dn_route.c
@@ -1149,9 +1149,9 @@ void __init dn_route_init(void)
panic("Failed to allocate DECnet route cache hash table\n");
printk(KERN_INFO
- "DECnet: Routing cache hash table of %u buckets, %dKbytes\n",
+ "DECnet: Routing cache hash table of %u buckets, %ldKbytes\n",
dn_rt_hash_mask,
- (dn_rt_hash_mask*sizeof(struct dn_rt_hash_bucket))/1024);
+ (long)(dn_rt_hash_mask*sizeof(struct dn_rt_hash_bucket))/1024);
dn_rt_hash_mask--;
for(i = 0; i <= dn_rt_hash_mask; i++) {
diff --git a/net/decnet/dn_table.c b/net/decnet/dn_table.c
index 48c319c8a..7a8f3768b 100644
--- a/net/decnet/dn_table.c
+++ b/net/decnet/dn_table.c
@@ -437,7 +437,7 @@ static int dn_fib_table_dump(struct dn_fib_table *tb, struct sk_buff *skb,
#else /* no CONFIG_RTNETLINK */
-#define dn_rt_msg_fib(event,f,z,tb_id,nlh,req)
+#define dn_rtmsg_fib(event,f,z,tb_id,nlh,req)
#endif /* CONFIG_RTNETLINK */