From nobody Mon Feb 9 20:59:12 2026 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) client-ip=66.175.222.108; envelope-from=bounce+27952+87284+1787277+3901457@groups.io; helo=mail02.groups.io; Authentication-Results: mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87284+1787277+3901457@groups.io; dmarc=fail(p=none dis=none) header.from=redhat.com ARC-Seal: i=1; a=rsa-sha256; t=1646417806; cv=none; d=zohomail.com; s=zohoarc; b=H1M4I5r3ULyAjXv6UbGL2FMMkMHZSgW74ynIJ/C2oDs4IQRPiWVDtcY+M/eeS6NIToRVGAiTyx/s5mdCu/9Lmpqfu9ZyXg8gW+UV90PRC+w4VSgj5BkWhXD2MeusRu5MiJOY2ZHyoMgJb9kqCrwIDE6uyrSOMzNpFOpHMIsi8Bc= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1646417806; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:List-Subscribe:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Reply-To:References:Sender:Subject:To; bh=SZ9wVhXLXoIze+3L+uY1/RqYuOLBPXFX7CQvaKLutFw=; b=HlrAIsUaAYJ98NEPpHEF7KoDGU0LA6AKS9c1H/p4c6m09fWmOW5k+n3I9Bf2OLvXbO0ZTUk/iyEQEgw9ilI9YV4vgszdopNUaHQOGACAE+Ba95uDRHJcgyvLq1MwB74jF4SsSdN937mGhWx1qulPp4CCHdWOywdh6bueZ2l/A8c= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass; spf=pass (zohomail.com: domain of groups.io designates 66.175.222.108 as permitted sender) smtp.mailfrom=bounce+27952+87284+1787277+3901457@groups.io; dmarc=fail header.from= (p=none dis=none) Received: from mail02.groups.io (mail02.groups.io [66.175.222.108]) by mx.zohomail.com with SMTPS id 1646417806366277.12250730859546; Fri, 4 Mar 2022 10:16:46 -0800 (PST) Return-Path: X-Received: by 127.0.0.2 with SMTP id f6d7YY1788612xQ2GtGdgem7; Fri, 04 Mar 2022 10:16:46 -0800 X-Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by mx.groups.io with SMTP id smtpd.web09.6906.1646400926550513006 for ; Fri, 04 Mar 2022 05:35:27 -0800 X-Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-563-HP3izbB7OICTgdD_zSiWFQ-1; Fri, 04 Mar 2022 08:35:22 -0500 X-MC-Unique: HP3izbB7OICTgdD_zSiWFQ-1 X-Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id B55C4653 for ; Fri, 4 Mar 2022 13:35:21 +0000 (UTC) X-Received: from osteffen-laptop.redhat.com (unknown [10.39.194.16]) by smtp.corp.redhat.com (Postfix) with ESMTP id 106177B5F1; Fri, 4 Mar 2022 13:35:20 +0000 (UTC) From: "Oliver Steffen" To: devel@edk2.groups.io Cc: Oliver Steffen Subject: [edk2-devel] [PATCH 1/4] NetworkPkg/HttpDxe: Decofigure Tcp4 before reconfiguring Date: Fri, 4 Mar 2022 14:34:28 +0100 Message-Id: <20220304133431.53378-2-osteffen@redhat.com> In-Reply-To: <20220304133431.53378-1-osteffen@redhat.com> References: <20220304133431.53378-1-osteffen@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Precedence: Bulk List-Unsubscribe: List-Subscribe: List-Help: Sender: devel@edk2.groups.io List-Id: Mailing-List: list devel@edk2.groups.io; contact devel+owner@edk2.groups.io Reply-To: devel@edk2.groups.io,osteffen@redhat.com X-Gm-Message-State: YsgRjNeChWMIO7ftYUeTLGNdx1787277AA= Content-Transfer-Encoding: quoted-printable DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=groups.io; q=dns/txt; s=20140610; t=1646417806; bh=GfB9AxX6Ex6kOgLYV4CpEO/ljwWtw01MgfBtTPoZZg8=; h=Cc:Content-Type:Date:From:Reply-To:Subject:To; b=QDRL8nSYstcfQSsVLYyeMejYWiecRM6ysPNjQ/78uB+39GXBJOqqw9iS1uu50WacujH NCaiSaYF53wxcljDGV9esjy5tNSlgVCPdcB4zg44gHY0y7PS3mW0MC5eYmkrKEGvvDoQL CZnvG97cz+JESWqxcxtpJraPSO6jU44yPIM= X-ZohoMail-DKIM: pass (identity @groups.io) X-ZM-MESSAGEID: 1646417808276100006 Content-Type: text/plain; charset="utf-8" REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3D2720 Check if the state of the HTTP instance is HTTP_STATE_TCP_CONNECTED, or HTTP_STATE_TCP_CLOSED and de-configure the Tcp4 instance before configuring it again. Signed-off-by: Oliver Steffen --- NetworkPkg/HttpDxe/HttpProto.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/NetworkPkg/HttpDxe/HttpProto.c b/NetworkPkg/HttpDxe/HttpProto.c index 9457dd2623..cd54c57404 100644 --- a/NetworkPkg/HttpDxe/HttpProto.c +++ b/NetworkPkg/HttpDxe/HttpProto.c @@ -1086,6 +1086,18 @@ HttpConfigureTcp4 ( Tcp4Option->EnableNagle =3D TRUE; Tcp4CfgData->ControlOption =3D Tcp4Option; =20 + if ((HttpInstance->State =3D=3D HTTP_STATE_TCP_CONNECTED) || + (HttpInstance->State =3D=3D HTTP_STATE_TCP_CLOSED)) + { + Status =3D HttpInstance->Tcp4->Configure (HttpInstance->Tcp4, NULL); + if (EFI_ERROR (Status)) { + DEBUG ((DEBUG_ERROR, "HttpConfigureTcp4(NULL) - %r\n", Status)); + return Status; + } + + HttpInstance->State =3D HTTP_STATE_TCP_UNCONFIGED; + } + Status =3D HttpInstance->Tcp4->Configure (HttpInstance->Tcp4, Tcp4CfgDat= a); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "HttpConfigureTcp4 - %r\n", Status)); --=20 2.35.1 -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#87284): https://edk2.groups.io/g/devel/message/87284 Mute This Topic: https://groups.io/mt/89555128/1787277 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [importer@patchew.org] -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-