From nobody Thu Jan 13 18:34:36 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id F311719552FF; Thu, 13 Jan 2022 18:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4JZY4X6X3cz3Mmw; Thu, 13 Jan 2022 18:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642098876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjRQDB1pDIYYxMvyYQ5OEauAYxbmEPF4IdZG2qcHHvQ=; b=HFGW56hXV9R3Pla6xR/mWcXNxcOw11IDpeJMTYlQ7qqa8Z+eOPoqxDnKmHvMdoGqy/n9s+ TMoyHUIq+DxD37a5naapjZTF+vg15kjXUpKnJX1I9h3PYdxA3Y3fkeH7bGLcj3yMIoBSjQ 6yLkPRL3DqgrIRzH9YUp6V7ZCttnl5XOOY5dACdlT3HIQd358jaZOfHleu/ttyyC+wM4ho KSdt92CNMupWfUiCO7WRlhmcWhxEXGqqtUYBDdfjtPktEOZcwaaE8SrVkPnHUEw3u8WHfu vkIL/sb7tx63jW7GXSwWo3D2TCYJy+aUwJc2TUv2ED6vx2envAwEi+hOj2zWdA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id C0A6C253DC; Thu, 13 Jan 2022 18:34:36 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 20DIYau2002701; Thu, 13 Jan 2022 18:34:36 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 20DIYaHN002700; Thu, 13 Jan 2022 18:34:36 GMT (envelope-from git) Date: Thu, 13 Jan 2022 18:34:36 GMT Message-Id: <202201131834.20DIYaHN002700@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Gleb Smirnoff Subject: git: 1d41a4940463 - main - tcp_usr_connect: report actual error code when stack requests drop List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: glebius X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 1d41a4940463429ec68e8baf9edf2ce98a5938c9 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1642098876; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=KjRQDB1pDIYYxMvyYQ5OEauAYxbmEPF4IdZG2qcHHvQ=; b=Ka7BNoBNXz+FykuE85uocOcZnhFjJZzEIvaQWHwPRfzGrfgCog9lSnVUUw4Urg+XL6HRe2 zhJIo7X7VfDEeUuGHaNNmnifT5r7BzD0bztDvYausCCwQ1GZCQckjDg/WC+8THCWjrSxsc dNntQsm2AX0VtnvNZa54A2dizxpyVVtzWTfsH3z+DyDX/lstoq6nP27NzgNIEVPu5Jy4Wa IrgQMuB0jD4sdXw356DcSJuvAyrLJTVYmmgGdnZ1swaAi5y5PKyi1PiZ80qjDtOiyGInNA 0UHziJ0sMpaqGkwISTGT6Za7MgzcI8dyx1g3W7K86n20m9yxlRskHXFWRntNCQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1642098876; a=rsa-sha256; cv=none; b=KTkNy/YM/k84/2m5JdzQNQZcu8Mzsn8C0xggRruCCFh2vo2UssGdz58C0yQEIFOHHXqYne AOYmugAFD6kMLG85DXO65/A1PCEMoPMzoeHQP/zzejDysRcr7wCpRFFqR424TqxQT3gego cjD2kNs2i9CEASEjKpSyf9h0tUSA9VFAdNmzji/ReP4pTcq5IxGQGsItiGj2/fIEfPMeGm wyCdKEpdHDAF/4n0v52FFk+MSt85YUIwosZ/rvlX9bqVBPvOpzRQfmNBNP2skJu3+bTR4j +OU4gaEgqNURFliyT9Wv/C3b5eziy3QocBFXvKtm9X4iM8y2Etrqz2ArtzrKGQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by glebius: URL: https://cgit.FreeBSD.org/src/commit/?id=1d41a4940463429ec68e8baf9edf2ce98a5938c9 commit 1d41a4940463429ec68e8baf9edf2ce98a5938c9 Author: Gleb Smirnoff AuthorDate: 2022-01-13 18:32:41 +0000 Commit: Gleb Smirnoff CommitDate: 2022-01-13 18:32:41 +0000 tcp_usr_connect: report actual error code when stack requests drop --- sys/netinet/tcp_usrreq.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sys/netinet/tcp_usrreq.c b/sys/netinet/tcp_usrreq.c index def7d477c72b..f409970d7ebf 100644 --- a/sys/netinet/tcp_usrreq.c +++ b/sys/netinet/tcp_usrreq.c @@ -594,8 +594,8 @@ tcp_usr_connect(struct socket *so, struct sockaddr *nam, struct thread *td) #endif tcp_timer_activate(tp, TT_KEEP, TP_KEEPINIT(tp)); error = tcp_output(tp); - KASSERT(error >= 0, ("TCP stack %s requested tcp_drop(%p) at connect()", - tp->t_fb->tfb_tcp_block_name, tp)); + KASSERT(error >= 0, ("TCP stack %s requested tcp_drop(%p) at connect()" + ", error code %d", tp->t_fb->tfb_tcp_block_name, tp, -error)); out_in_epoch: NET_EPOCH_EXIT(et); out: @@ -722,8 +722,8 @@ out_in_epoch: #endif NET_EPOCH_EXIT(et); out: - KASSERT(error >= 0, ("TCP stack %s requested tcp_drop(%p) at connect()", - tp->t_fb->tfb_tcp_block_name, tp)); + KASSERT(error >= 0, ("TCP stack %s requested tcp_drop(%p) at connect()" + ", error code %d", tp->t_fb->tfb_tcp_block_name, tp, -error)); /* * If the implicit bind in the connect call fails, restore * the flags we modified.