Author: tuexen
Date: Sun Apr  8 11:50:06 2018
New Revision: 332271
URL: https://svnweb.freebsd.org/changeset/base/332271

Log:
  Small cleanup, no functional change.
  
  MFC after:    3 days

Modified:
  head/sys/netinet/sctp_usrreq.c

Modified: head/sys/netinet/sctp_usrreq.c
==============================================================================
--- head/sys/netinet/sctp_usrreq.c      Sun Apr  8 11:39:27 2018        
(r332270)
+++ head/sys/netinet/sctp_usrreq.c      Sun Apr  8 11:50:06 2018        
(r332271)
@@ -705,22 +705,10 @@ sctp_disconnect(struct socket *so)
                                if (SCTP_GET_STATE(asoc) !=
                                    SCTP_STATE_COOKIE_WAIT) {
                                        /* Left with Data unread */
-                                       struct mbuf *err;
+                                       struct mbuf *op_err;
 
-                                       err = 
sctp_get_mbuf_for_msg(sizeof(struct sctp_paramhdr), 0, M_NOWAIT, 1, MT_DATA);
-                                       if (err) {
-                                               /*
-                                                * Fill in the user
-                                                * initiated abort
-                                                */
-                                               struct sctp_paramhdr *ph;
-
-                                               ph = mtod(err, struct 
sctp_paramhdr *);
-                                               SCTP_BUF_LEN(err) = 
sizeof(struct sctp_paramhdr);
-                                               ph->param_type = 
htons(SCTP_CAUSE_USER_INITIATED_ABT);
-                                               ph->param_length = 
htons(SCTP_BUF_LEN(err));
-                                       }
-                                       sctp_send_abort_tcb(stcb, err, 
SCTP_SO_LOCKED);
+                                       op_err = 
sctp_generate_cause(SCTP_CAUSE_USER_INITIATED_ABT, "");
+                                       sctp_send_abort_tcb(stcb, op_err, 
SCTP_SO_LOCKED);
                                        SCTP_STAT_INCR_COUNTER32(sctps_aborted);
                                }
                                SCTP_INP_RUNLOCK(inp);
_______________________________________________
svn-src-head@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to