Author: tuexen
Date: Sat Apr  7 19:59:40 2018
New Revision: 332215
URL: https://svnweb.freebsd.org/changeset/base/332215

Log:
  MFC r324730:
  
  Fix a signed/unsigned warning.

Modified:
  stable/11/sys/netinet/sctp_indata.c
Directory Properties:
  stable/11/   (props changed)

Modified: stable/11/sys/netinet/sctp_indata.c
==============================================================================
--- stable/11/sys/netinet/sctp_indata.c Sat Apr  7 19:58:14 2018        
(r332214)
+++ stable/11/sys/netinet/sctp_indata.c Sat Apr  7 19:59:40 2018        
(r332215)
@@ -2641,10 +2641,11 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o
        struct sctp_association *asoc;
        int num_chunks = 0;     /* number of control chunks processed */
        int stop_proc = 0;
-       int chk_length, break_flag, last_chunk;
+       int break_flag, last_chunk;
        int abort_flag = 0, was_a_gap;
        struct mbuf *m;
        uint32_t highest_tsn;
+       uint16_t chk_length;
 
        /* set the rwnd */
        sctp_set_rwnd(stcb, &stcb->asoc);
@@ -2739,7 +2740,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o
                }
                if ((ch->chunk_type == SCTP_DATA) ||
                    (ch->chunk_type == SCTP_IDATA)) {
-                       int clen;
+                       uint16_t clen;
 
                        if (ch->chunk_type == SCTP_DATA) {
                                clen = sizeof(struct sctp_data_chunk);
@@ -2754,7 +2755,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o
                                struct mbuf *op_err;
                                char msg[SCTP_DIAG_INFO_LEN];
 
-                               snprintf(msg, sizeof(msg), "%s chunk of length 
%d",
+                               snprintf(msg, sizeof(msg), "%s chunk of length 
%u",
                                    ch->chunk_type == SCTP_DATA ? "DATA" : 
"I-DATA",
                                    chk_length);
                                op_err = 
sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
@@ -2844,7 +2845,7 @@ sctp_process_data(struct mbuf **mm, int iphlen, int *o
                                        struct mbuf *op_err;
                                        char msg[SCTP_DIAG_INFO_LEN];
 
-                                       snprintf(msg, sizeof(msg), "Chunk of 
length %d",
+                                       snprintf(msg, sizeof(msg), "Chunk of 
length %u",
                                            chk_length);
                                        op_err = 
sctp_generate_cause(SCTP_CAUSE_PROTOCOL_VIOLATION, msg);
                                        stcb->sctp_ep->last_abort_code = 
SCTP_FROM_SCTP_INDATA + SCTP_LOC_20;
_______________________________________________
svn-src-all@freebsd.org mailing list
https://lists.freebsd.org/mailman/listinfo/svn-src-all
To unsubscribe, send any mail to "svn-src-all-unsubscr...@freebsd.org"

Reply via email to