diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-09 20:33:35 +0000 |
commit | 116674acc97ba75a720329996877077d988443a2 (patch) | |
tree | 6a3f2ff0b612ae2ee8a3f3509370c9e6333a53b3 /net/core | |
parent | 71118c319fcae4a138f16e35b4f7e0a6d53ce2ca (diff) |
Merge with Linux 2.4.2.
Diffstat (limited to 'net/core')
-rw-r--r-- | net/core/datagram.c | 13 | ||||
-rw-r--r-- | net/core/iovec.c | 2 | ||||
-rw-r--r-- | net/core/skbuff.c | 3 | ||||
-rw-r--r-- | net/core/sock.c | 9 |
4 files changed, 19 insertions, 8 deletions
diff --git a/net/core/datagram.c b/net/core/datagram.c index 0b865f6b9..d7064ec63 100644 --- a/net/core/datagram.c +++ b/net/core/datagram.c @@ -72,19 +72,19 @@ static int wait_for_packet(struct sock * sk, int *err, long *timeo_p) /* Socket errors? */ error = sock_error(sk); if (error) - goto out; + goto out_err; if (!skb_queue_empty(&sk->receive_queue)) goto ready; /* Socket shut down? */ if (sk->shutdown & RCV_SHUTDOWN) - goto out; + goto out_noerr; /* Sequenced packets can come disconnected. If so we report the problem */ error = -ENOTCONN; if(connection_based(sk) && !(sk->state==TCP_ESTABLISHED || sk->state==TCP_LISTEN)) - goto out; + goto out_err; /* handle signals */ if (signal_pending(current)) @@ -99,11 +99,16 @@ ready: interrupted: error = sock_intr_errno(*timeo_p); +out_err: + *err = error; out: current->state = TASK_RUNNING; remove_wait_queue(sk->sleep, &wait); - *err = error; return error; +out_noerr: + *err = 0; + error = 1; + goto out; } /* diff --git a/net/core/iovec.c b/net/core/iovec.c index 4ebad506e..2fe34a20d 100644 --- a/net/core/iovec.c +++ b/net/core/iovec.c @@ -21,7 +21,7 @@ #include <linux/sched.h> #include <linux/kernel.h> #include <linux/mm.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/net.h> #include <linux/in6.h> #include <asm/uaccess.h> diff --git a/net/core/skbuff.c b/net/core/skbuff.c index 5275e83b8..c9b760cae 100644 --- a/net/core/skbuff.c +++ b/net/core/skbuff.c @@ -44,11 +44,10 @@ #include <linux/interrupt.h> #include <linux/in.h> #include <linux/inet.h> -#include <linux/malloc.h> +#include <linux/slab.h> #include <linux/netdevice.h> #include <linux/string.h> #include <linux/skbuff.h> -#include <linux/slab.h> #include <linux/cache.h> #include <linux/init.h> diff --git a/net/core/sock.c b/net/core/sock.c index d15bd82f4..fa5e0a890 100644 --- a/net/core/sock.c +++ b/net/core/sock.c @@ -7,7 +7,7 @@ * handler for protocols to use and generic option handler. * * - * Version: $Id: sock.c,v 1.102 2000/12/11 23:00:24 davem Exp $ + * Version: $Id: sock.c,v 1.104 2001/01/30 07:48:30 davem Exp $ * * Authors: Ross Biro, <bir7@leland.Stanford.Edu> * Fred N. van Kempen, <waltje@uWalt.NL.Mugnet.ORG> @@ -550,6 +550,13 @@ int sock_getsockopt(struct socket *sock, int level, int optname, goto lenout; } + /* Dubious BSD thing... Probably nobody even uses it, but + * the UNIX standard wants it for whatever reason... -DaveM + */ + case SO_ACCEPTCONN: + v.val = (sk->state == TCP_LISTEN); + break; + default: return(-ENOPROTOOPT); } |