summaryrefslogtreecommitdiff
path: root/include/net/sctp/structs.h
diff options
context:
space:
mode:
authorXin Long <lucien.xin@gmail.com>2017-06-20 11:05:11 +0300
committerDavid S. Miller <davem@davemloft.net>2017-06-20 22:32:55 +0300
commit5ee8aa689780f2c19702fe3768a3103b9c07d72e (patch)
tree51756f9ea4bb01a443a783b5cb22f0f587dcff9b /include/net/sctp/structs.h
parent8cd5c25f2db03306727d2f6b8f28956169dc1123 (diff)
downloadlinux-5ee8aa689780f2c19702fe3768a3103b9c07d72e.tar.xz
sctp: handle errors when updating asoc
It's a bad thing not to handle errors when updating asoc. The memory allocation failure in any of the functions called in sctp_assoc_update() would cause sctp to work unexpectedly. This patch is to fix it by aborting the asoc and reporting the error when any of these functions fails. Signed-off-by: Xin Long <lucien.xin@gmail.com> Acked-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/net/sctp/structs.h')
-rw-r--r--include/net/sctp/structs.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/include/net/sctp/structs.h b/include/net/sctp/structs.h
index 5051317162df..e26763bfabd6 100644
--- a/include/net/sctp/structs.h
+++ b/include/net/sctp/structs.h
@@ -1953,8 +1953,8 @@ struct sctp_transport *sctp_assoc_is_match(struct sctp_association *,
const union sctp_addr *,
const union sctp_addr *);
void sctp_assoc_migrate(struct sctp_association *, struct sock *);
-void sctp_assoc_update(struct sctp_association *old,
- struct sctp_association *new);
+int sctp_assoc_update(struct sctp_association *old,
+ struct sctp_association *new);
__u32 sctp_association_get_next_tsn(struct sctp_association *);