Source-Changes-HG archive

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

[src/trunk]: src/sys/netinet tcp: fix wrong logic in tcp_drop



details:   https://anonhg.NetBSD.org/src/rev/90f4cad787d3
branches:  trunk
changeset: 372206:90f4cad787d3
user:      ozaki-r <ozaki-r%NetBSD.org@localhost>
date:      Mon Oct 31 00:56:33 2022 +0000

description:
tcp: fix wrong logic in tcp_drop

Pointed out by mlelstv@

diffstat:

 sys/netinet/tcp_subr.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 50a788e0d2d7 -r 90f4cad787d3 sys/netinet/tcp_subr.c
--- a/sys/netinet/tcp_subr.c    Sun Oct 30 23:10:43 2022 +0000
+++ b/sys/netinet/tcp_subr.c    Mon Oct 31 00:56:33 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: tcp_subr.c,v 1.293 2022/10/28 05:25:36 ozaki-r Exp $   */
+/*     $NetBSD: tcp_subr.c,v 1.294 2022/10/31 00:56:33 ozaki-r Exp $   */
 
 /*
  * Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project.
@@ -91,7 +91,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.293 2022/10/28 05:25:36 ozaki-r Exp $");
+__KERNEL_RCSID(0, "$NetBSD: tcp_subr.c,v 1.294 2022/10/31 00:56:33 ozaki-r Exp $");
 
 #ifdef _KERNEL_OPT
 #include "opt_inet.h"
@@ -1022,7 +1022,7 @@
        KASSERT(tp->t_inpcb != NULL);
 
        so = tp->t_inpcb->inp_socket;
-       if (so != NULL)
+       if (so == NULL)
                return NULL;
 
        if (TCPS_HAVERCVDSYN(tp->t_state)) {



Home | Main Index | Thread Index | Old Index