Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/kern Implement SCTP bug fixes found by maxv@.



details:   https://anonhg.NetBSD.org/src/rev/ce36f4e004c8
branches:  trunk
changeset: 971513:ce36f4e004c8
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Sun Apr 26 14:21:14 2020 +0000

description:
Implement SCTP bug fixes found by maxv@.

Adding these seems to improve the SCTP situation.

diffstat:

 sys/kern/uipc_socket.c |  9 ++++-----
 1 files changed, 4 insertions(+), 5 deletions(-)

diffs (37 lines):

diff -r e1b543847942 -r ce36f4e004c8 sys/kern/uipc_socket.c
--- a/sys/kern/uipc_socket.c    Sun Apr 26 14:07:43 2020 +0000
+++ b/sys/kern/uipc_socket.c    Sun Apr 26 14:21:14 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: uipc_socket.c,v 1.288 2020/02/22 08:39:33 maxv Exp $   */
+/*     $NetBSD: uipc_socket.c,v 1.289 2020/04/26 14:21:14 jakllsch Exp $       */
 
 /*
  * Copyright (c) 2002, 2007, 2008, 2009 The NetBSD Foundation, Inc.
@@ -71,7 +71,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.288 2020/02/22 08:39:33 maxv Exp $");
+__KERNEL_RCSID(0, "$NetBSD: uipc_socket.c,v 1.289 2020/04/26 14:21:14 jakllsch Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_compat_netbsd.h"
@@ -1336,7 +1336,7 @@
                                m = m->m_next;
                        } else {
                                sbfree(&so->so_rcv, m);
-                               /* XXX XXX XXX: should set mbuf_removed? */
+                               mbuf_removed = 1;
                                if (paddr) {
                                        *paddr = m;
                                        so->so_rcv.sb_mb = m->m_next;
@@ -1345,8 +1345,7 @@
                                } else {
                                        m = so->so_rcv.sb_mb = m_free(m);
                                }
-                               /* XXX XXX XXX: isn't there an sbsync()
-                                * missing here? */
+                               sbsync(&so->so_rcv, nextrecord);
                        }
                }
        }



Home | Main Index | Thread Index | Old Index