Hi,

On 2019/02/12 23:40, Robert Swindells wrote:
Module Name:    src
Committed By:   rjs
Date:           Tue Feb 12 14:40:38 UTC 2019

Modified Files:
        src/sys/netinet: sctp_input.c sctp_usrreq.c

Log Message:
Add some fallthrough annotations.
...
Index: src/sys/netinet/sctp_usrreq.c
diff -u src/sys/netinet/sctp_usrreq.c:1.14 src/sys/netinet/sctp_usrreq.c:1.15
--- src/sys/netinet/sctp_usrreq.c:1.14  Mon Jan 28 12:53:01 2019
+++ src/sys/netinet/sctp_usrreq.c       Tue Feb 12 14:40:38 2019
@@ -1,5 +1,5 @@
  /*    $KAME: sctp_usrreq.c,v 1.50 2005/06/16 20:45:29 jinmei Exp $    */
-/*     $NetBSD: sctp_usrreq.c,v 1.14 2019/01/28 12:53:01 martin Exp $  */
+/*     $NetBSD: sctp_usrreq.c,v 1.15 2019/02/12 14:40:38 rjs Exp $     */
/*
   * Copyright (c) 2001, 2002, 2003, 2004 Cisco Systems, Inc.
@@ -33,7 +33,7 @@
   * SUCH DAMAGE.
   */
  #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.14 2019/01/28 12:53:01 martin Exp 
$");
+__KERNEL_RCSID(0, "$NetBSD: sctp_usrreq.c,v 1.15 2019/02/12 14:40:38 rjs Exp 
$");
#ifdef _KERNEL_OPT
  #include "opt_inet.h"
@@ -2289,7 +2289,7 @@ sctp_optsget(struct socket *so, struct s
                *s_info = stcb->asoc.def_send;
                SCTP_TCB_UNLOCK(stcb);
                sopt->sopt_size = sizeof(*s_info);
-       }
+       } /* FALLTHROUGH */
        case SCTP_INITMSG:
        {
                struct sctp_initmsg *sinit;


It seems for me that we need "break" here; sopt->sopt_data and
sopt_size are unconditionally overwritten if fallthrough.

Thoughts?

Thanks,
rin

Reply via email to