diff options
author | Paul Mackerras <paulus@samba.org> | 2006-08-31 01:45:48 -0400 |
---|---|---|
committer | Paul Mackerras <paulus@samba.org> | 2006-08-31 01:45:48 -0400 |
commit | aa43f77939c97bf9d3580c6a5e71a5a40290e451 (patch) | |
tree | 095c0b8b3da4b6554a3f8ef4b39240a5d9216d4d /net/sctp/socket.c | |
parent | 2818c5dec5e28d65d52afbb7695bbbafe6377ee5 (diff) | |
parent | 4c15343167b5febe7bb0ba96aad5bef42ae94d3b (diff) |
Merge branch 'merge'
Diffstat (limited to 'net/sctp/socket.c')
-rw-r--r-- | net/sctp/socket.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/net/sctp/socket.c b/net/sctp/socket.c index 54722e622e6d..dab15949958e 100644 --- a/net/sctp/socket.c +++ b/net/sctp/socket.c | |||
@@ -1289,9 +1289,13 @@ SCTP_STATIC void sctp_close(struct sock *sk, long timeout) | |||
1289 | } | 1289 | } |
1290 | } | 1290 | } |
1291 | 1291 | ||
1292 | if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) | 1292 | if (sock_flag(sk, SOCK_LINGER) && !sk->sk_lingertime) { |
1293 | sctp_primitive_ABORT(asoc, NULL); | 1293 | struct sctp_chunk *chunk; |
1294 | else | 1294 | |
1295 | chunk = sctp_make_abort_user(asoc, NULL, 0); | ||
1296 | if (chunk) | ||
1297 | sctp_primitive_ABORT(asoc, chunk); | ||
1298 | } else | ||
1295 | sctp_primitive_SHUTDOWN(asoc, NULL); | 1299 | sctp_primitive_SHUTDOWN(asoc, NULL); |
1296 | } | 1300 | } |
1297 | 1301 | ||
@@ -1520,8 +1524,16 @@ SCTP_STATIC int sctp_sendmsg(struct kiocb *iocb, struct sock *sk, | |||
1520 | goto out_unlock; | 1524 | goto out_unlock; |
1521 | } | 1525 | } |
1522 | if (sinfo_flags & SCTP_ABORT) { | 1526 | if (sinfo_flags & SCTP_ABORT) { |
1527 | struct sctp_chunk *chunk; | ||
1528 | |||
1529 | chunk = sctp_make_abort_user(asoc, msg, msg_len); | ||
1530 | if (!chunk) { | ||
1531 | err = -ENOMEM; | ||
1532 | goto out_unlock; | ||
1533 | } | ||
1534 | |||
1523 | SCTP_DEBUG_PRINTK("Aborting association: %p\n", asoc); | 1535 | SCTP_DEBUG_PRINTK("Aborting association: %p\n", asoc); |
1524 | sctp_primitive_ABORT(asoc, msg); | 1536 | sctp_primitive_ABORT(asoc, chunk); |
1525 | err = 0; | 1537 | err = 0; |
1526 | goto out_unlock; | 1538 | goto out_unlock; |
1527 | } | 1539 | } |