diff options
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 710df67a6785..d47d5787e2e5 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1,4 +1,4 @@ | |||
1 | /* SCTP kernel reference Implementation | 1 | /* SCTP kernel implementation |
2 | * (C) Copyright IBM Corp. 2001, 2004 | 2 | * (C) Copyright IBM Corp. 2001, 2004 |
3 | * Copyright (c) 1999-2000 Cisco, Inc. | 3 | * Copyright (c) 1999-2000 Cisco, Inc. |
4 | * Copyright (c) 1999-2001 Motorola, Inc. | 4 | * Copyright (c) 1999-2001 Motorola, Inc. |
@@ -6,7 +6,7 @@ | |||
6 | * Copyright (c) 2001-2002 Nokia, Inc. | 6 | * Copyright (c) 2001-2002 Nokia, Inc. |
7 | * Copyright (c) 2001 La Monte H.P. Yarroll | 7 | * Copyright (c) 2001 La Monte H.P. Yarroll |
8 | * | 8 | * |
9 | * This file is part of the SCTP kernel reference Implementation | 9 | * This file is part of the SCTP kernel implementation |
10 | * | 10 | * |
11 | * These functions interface with the sockets layer to implement the | 11 | * These functions interface with the sockets layer to implement the |
12 | * SCTP Extensions for the Sockets API. | 12 | * SCTP Extensions for the Sockets API. |
@@ -15,13 +15,13 @@ | |||
15 | * functions--this file is the functions which populate the struct proto | 15 | * functions--this file is the functions which populate the struct proto |
16 | * for SCTP which is the BOTTOM of the sockets interface. | 16 | * for SCTP which is the BOTTOM of the sockets interface. |
17 | * | 17 | * |
18 | * The SCTP reference implementation is free software; | 18 | * This SCTP implementation is free software; |
19 | * you can redistribute it and/or modify it under the terms of | 19 | * you can redistribute it and/or modify it under the terms of |
20 | * the GNU General Public License as published by | 20 | * the GNU General Public License as published by |
21 | * the Free Software Foundation; either version 2, or (at your option) | 21 | * the Free Software Foundation; either version 2, or (at your option) |
22 | * any later version. | 22 | * any later version. |
23 | * | 23 | * |
24 | * The SCTP reference implementation is distributed in the hope that it | 24 | * This SCTP implementation is distributed in the hope that it |
25 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied | 25 | * will be useful, but WITHOUT ANY WARRANTY; without even the implied |
26 | * ************************ | 26 | * ************************ |
27 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. | 27 | * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. |
@@ -1911,7 +1911,8 @@ SCTP_STATIC int sctp_recvmsg(struct kiocb *iocb, struct sock *sk, | |||
1911 | * rwnd by that amount. If all the data in the skb is read, | 1911 | * rwnd by that amount. If all the data in the skb is read, |
1912 | * rwnd is updated when the event is freed. | 1912 | * rwnd is updated when the event is freed. |
1913 | */ | 1913 | */ |
1914 | sctp_assoc_rwnd_increase(event->asoc, copied); | 1914 | if (!sctp_ulpevent_is_notification(event)) |
1915 | sctp_assoc_rwnd_increase(event->asoc, copied); | ||
1915 | goto out; | 1916 | goto out; |
1916 | } else if ((event->msg_flags & MSG_NOTIFICATION) || | 1917 | } else if ((event->msg_flags & MSG_NOTIFICATION) || |
1917 | (event->msg_flags & MSG_EOR)) | 1918 | (event->msg_flags & MSG_EOR)) |
@@ -4314,6 +4315,9 @@ static int sctp_copy_laddrs_old(struct sock *sk, __u16 port, | |||
4314 | (AF_INET6 == addr->a.sa.sa_family)) | 4315 | (AF_INET6 == addr->a.sa.sa_family)) |
4315 | continue; | 4316 | continue; |
4316 | memcpy(&temp, &addr->a, sizeof(temp)); | 4317 | memcpy(&temp, &addr->a, sizeof(temp)); |
4318 | if (!temp.v4.sin_port) | ||
4319 | temp.v4.sin_port = htons(port); | ||
4320 | |||
4317 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), | 4321 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), |
4318 | &temp); | 4322 | &temp); |
4319 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 4323 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |
@@ -4346,6 +4350,9 @@ static int sctp_copy_laddrs(struct sock *sk, __u16 port, void *to, | |||
4346 | (AF_INET6 == addr->a.sa.sa_family)) | 4350 | (AF_INET6 == addr->a.sa.sa_family)) |
4347 | continue; | 4351 | continue; |
4348 | memcpy(&temp, &addr->a, sizeof(temp)); | 4352 | memcpy(&temp, &addr->a, sizeof(temp)); |
4353 | if (!temp.v4.sin_port) | ||
4354 | temp.v4.sin_port = htons(port); | ||
4355 | |||
4349 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), | 4356 | sctp_get_pf_specific(sk->sk_family)->addr_v4map(sctp_sk(sk), |
4350 | &temp); | 4357 | &temp); |
4351 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; | 4358 | addrlen = sctp_get_af_specific(temp.sa.sa_family)->sockaddr_len; |