diff options
author | Dave Jones <davej@redhat.com> | 2005-12-06 22:14:09 -0500 |
---|---|---|
committer | Dave Jones <davej@redhat.com> | 2005-12-06 22:14:09 -0500 |
commit | fc457fa7c0cdbfe96812ba377e508880d600298f (patch) | |
tree | 514049d61cf8b1587141a375ba3ec4f71e09a9db /net/sctp | |
parent | cc6e8de8f0fab61760bb7091fb19eef1406e17be (diff) | |
parent | e4f5c82a92c2a546a16af1614114eec19120e40a (diff) |
Merge ../linus/
Diffstat (limited to 'net/sctp')
-rw-r--r-- | net/sctp/socket.c | 10 | ||||
-rw-r--r-- | net/sctp/transport.c | 3 |
2 files changed, 7 insertions, 6 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index abab81f381..d890dfa881 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, | |||
4743 | struct sk_buff *skb; | 4743 | struct sk_buff *skb; |
4744 | long timeo; | 4744 | long timeo; |
4745 | 4745 | ||
4746 | /* Caller is allowed not to check sk->sk_err before calling. */ | ||
4747 | error = sock_error(sk); | ||
4748 | if (error) | ||
4749 | goto no_packet; | ||
4750 | |||
4751 | timeo = sock_rcvtimeo(sk, noblock); | 4746 | timeo = sock_rcvtimeo(sk, noblock); |
4752 | 4747 | ||
4753 | SCTP_DEBUG_PRINTK("Timeout: timeo: %ld, MAX: %ld.\n", | 4748 | 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, | |||
4774 | if (skb) | 4769 | if (skb) |
4775 | return skb; | 4770 | return skb; |
4776 | 4771 | ||
4772 | /* Caller is allowed not to check sk->sk_err before calling. */ | ||
4773 | error = sock_error(sk); | ||
4774 | if (error) | ||
4775 | goto no_packet; | ||
4776 | |||
4777 | if (sk->sk_shutdown & RCV_SHUTDOWN) | 4777 | if (sk->sk_shutdown & RCV_SHUTDOWN) |
4778 | break; | 4778 | break; |
4779 | 4779 | ||
diff --git a/net/sctp/transport.c b/net/sctp/transport.c index 6bc27200e6..268ddaf2dc 100644 --- a/net/sctp/transport.c +++ b/net/sctp/transport.c | |||
@@ -261,7 +261,8 @@ void sctp_transport_route(struct sctp_transport *transport, | |||
261 | * association's active path for getsockname(). | 261 | * association's active path for getsockname(). |
262 | */ | 262 | */ |
263 | if (asoc && (transport == asoc->peer.active_path)) | 263 | if (asoc && (transport == asoc->peer.active_path)) |
264 | af->to_sk_saddr(&transport->saddr, asoc->base.sk); | 264 | opt->pf->af->to_sk_saddr(&transport->saddr, |
265 | asoc->base.sk); | ||
265 | } else | 266 | } else |
266 | transport->pmtu = SCTP_DEFAULT_MAXSEGMENT; | 267 | transport->pmtu = SCTP_DEFAULT_MAXSEGMENT; |
267 | } | 268 | } |