aboutsummaryrefslogtreecommitdiff
path: root/net/sctp
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2005-12-02 23:09:38 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2005-12-02 23:09:38 -0800
commitb3c6aeb3ce26b286769d2deafec47d218c83dd09 (patch)
tree06378a021f5873003a07f0388aa0cb6e81a32c19 /net/sctp
parentaf2eb17bac41a116b73d85b3fb160405c32bea5b (diff)
parentaf1afe866297448ad8a1da99fa8a6af86c43c909 (diff)
Merge master.kernel.org:/pub/scm/linux/kernel/git/davem/net-2.6
Diffstat (limited to 'net/sctp')
-rw-r--r--net/sctp/socket.c10
-rw-r--r--net/sctp/transport.c3
2 files changed, 7 insertions, 6 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c
index abab81f3818..d890dfa8818 100644
--- a/net/sctp/socket.c
+++ b/net/sctp/socket.c
@@ -4743,11 +4743,6 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
struct sk_buff *skb;
long timeo;
- /* Caller is allowed not to check sk->sk_err before calling. */
- error = sock_error(sk);
- if (error)
- goto no_packet;
-
timeo = sock_rcvtimeo(sk, noblock);
SCTP_DEBUG_PRINTK("Timeout: timeo: %ld, MAX: %ld.\n",
@@ -4774,6 +4769,11 @@ static struct sk_buff *sctp_skb_recv_datagram(struct sock *sk, int flags,
if (skb)
return skb;
+ /* Caller is allowed not to check sk->sk_err before calling. */
+ error = sock_error(sk);
+ if (error)
+ goto no_packet;
+
if (sk->sk_shutdown & RCV_SHUTDOWN)
break;
diff --git a/net/sctp/transport.c b/net/sctp/transport.c
index 6bc27200e6c..268ddaf2dc0 100644
--- a/net/sctp/transport.c
+++ b/net/sctp/transport.c
@@ -261,7 +261,8 @@ void sctp_transport_route(struct sctp_transport *transport,
* association's active path for getsockname().
*/
if (asoc && (transport == asoc->peer.active_path))
- af->to_sk_saddr(&transport->saddr, asoc->base.sk);
+ opt->pf->af->to_sk_saddr(&transport->saddr,
+ asoc->base.sk);
} else
transport->pmtu = SCTP_DEFAULT_MAXSEGMENT;
}