From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#36660: 27.0.50; :nowait fails when failing over when using TLS Date: Mon, 15 Jul 2019 13:10:01 +0200 Message-ID: References: Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="35886"; mail-complaints-to="usenet@blaine.gmane.org" To: 36660@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Mon Jul 15 13:11:08 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1hmyst-0009E7-NL for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 13:11:07 +0200 Original-Received: from localhost ([::1]:37190 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmyss-0002z9-OJ for geb-bug-gnu-emacs@m.gmane.org; Mon, 15 Jul 2019 07:11:06 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:46202) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hmysp-0002yN-Rv for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 07:11:04 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hmyso-0008Vy-Op for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 07:11:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:37790) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1hmyso-0008Vf-KG for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 07:11:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1hmyso-0003Cx-E6 for bug-gnu-emacs@gnu.org; Mon, 15 Jul 2019 07:11:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Mon, 15 Jul 2019 11:11:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 36660 X-GNU-PR-Package: emacs Original-Received: via spool by 36660-submit@debbugs.gnu.org id=B36660.156318901212097 (code B ref 36660); Mon, 15 Jul 2019 11:11:02 +0000 Original-Received: (at 36660) by debbugs.gnu.org; 15 Jul 2019 11:10:12 +0000 Original-Received: from localhost ([127.0.0.1]:46608 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmyrz-000393-PG for submit@debbugs.gnu.org; Mon, 15 Jul 2019 07:10:12 -0400 Original-Received: from mail-wr1-f54.google.com ([209.85.221.54]:38492) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1hmyrx-00038k-KX for 36660@debbugs.gnu.org; Mon, 15 Jul 2019 07:10:10 -0400 Original-Received: by mail-wr1-f54.google.com with SMTP id g17so16623094wrr.5 for <36660@debbugs.gnu.org>; Mon, 15 Jul 2019 04:10:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:references:mail-copies-to:gmane-reply-to-list:date :in-reply-to:message-id:mime-version; bh=UnW0Nww8L5f2XK6HTVkpKPWrS3X1jtO47Wjufg8Lno0=; b=MYHpEQVzHzWhff073BeTB54Mi0haAgG1ibx8F6odKoGtHw8Je80f5gMRH712B2Q9Ct RuydN9ovG8+dZdhVnHeKl9nm71BgsOtM4BvkGj8ki3rd+9waRAeh99TfeB45rtvZKrOo UOBcmzUB41ZM8Zyw4LRO3D8CoInMCtyribgglElBKnyLKH0JM9WNsqIioehiF7jabuGV 7zX0ICQaGYiriqVfdzPHxByLzlMOFBumvPGIGB5ie4+TWXf3+lowlQWK8iBpjv4niL3h MRTv+Q1RyHcUhjc6Fzd+3IxRzQqM+eWeEsr6jdazp1fw/8CzLl39JRbPCCUzIqyE6lll 11ZQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:mime-version; bh=UnW0Nww8L5f2XK6HTVkpKPWrS3X1jtO47Wjufg8Lno0=; b=qPm3DlxJv3Dpu0H11PgFMU52mtVrcJDFMDiqrhUVuV1MsxOgbljuKTI57AOqC+wOes KMCZ4fS1x3dX4ahvS762hra8/XN9IDgmxiMhxgbwOg4+L2zvubtdN71KfQIdJGyIhE+R Qo6Qi59YwpW50qOiaJOO0x+VZatdC6uBeqNYdxu8F6UxL13ZdyUl1ASxIq9wKIwAHN6S Z/a7efHp85g1JxLH0a45Dx7R9fg7Tx/LTyAOIMwLFMFMOqInEkew2FVmZlib/iGC/mIF kpRkcFH9KPClA5kUeStp5Wan9O053LnfBXOpMCNgeOHZlEc5C+mbfwLi4EE1zVZaAY4O OF6Q== X-Gm-Message-State: APjAAAWdBOEWWP/CofGCjMX9mO/ARDTylLCnW0p2RvW2eZnXrSDLZNgP XBWlcSbT0M71Zvf+gLra8eWzabU+ X-Google-Smtp-Source: APXvYqzxok5aV4oam/HcgZNw5zlEsePk13Jj/9vtw2suqa8sImh+FiRUP5Cugzqn5COAQCz3zQwkvw== X-Received: by 2002:a5d:52c5:: with SMTP id r5mr10009775wrv.146.1563189003194; Mon, 15 Jul 2019 04:10:03 -0700 (PDT) Original-Received: from rpluim-mac ([149.5.228.1]) by smtp.gmail.com with ESMTPSA id i66sm29413704wmi.11.2019.07.15.04.10.01 for <36660@debbugs.gnu.org> (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Mon, 15 Jul 2019 04:10:02 -0700 (PDT) Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: (Robert Pluim's message of "Mon, 15 Jul 2019 12:57:29 +0200") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:163089 Archived-At: --=-=-= Content-Type: text/plain O frabjous day! What a bug number :-) --=-=-= Content-Type: text/x-patch Content-Disposition: inline; filename=0001-Don-t-delete-GnuTLS-boot-parameters-too-early.patch >From cfd2d8cbadc3c2b744e40c47cdce4344da1eef77 Mon Sep 17 00:00:00 2001 From: Robert Pluim Date: Mon, 15 Jul 2019 13:04:59 +0200 Subject: [PATCH] Don't delete GnuTLS boot parameters too early To: emacs-devel@gnu.org When falling back from one IP address to another for the same host, we need to keep the TLS boot parameters around until we've actually managed to connect, otherwise the fallback connection(s) will use TCP rather than TLS. (Bug#36660) * src/process.c (connect_network_socket): Don't delete the GnuTLS boot parameters until after we've managed to connect at the IP level. --- src/process.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/process.c b/src/process.c index cab390c10c..23c9be2b7b 100644 --- a/src/process.c +++ b/src/process.c @@ -3682,11 +3682,14 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos, Lisp_Object boot, params = p->gnutls_boot_parameters; boot = Fgnutls_boot (proc, XCAR (params), XCDR (params)); - p->gnutls_boot_parameters = Qnil; if (p->gnutls_initstage == GNUTLS_STAGE_READY) + { /* Run sentinels, etc. */ + p->gnutls_boot_parameters = Qnil; + finish_after_tls_connection (proc); + } else if (p->gnutls_initstage != GNUTLS_STAGE_HANDSHAKE_TRIED) { deactivate_process (proc); -- 2.21.0.419.gffac537e6c --=-=-=--