From nobody Sat Apr 27 20:26:48 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zoho.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org; Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 149273942015394.1276279918344; Thu, 20 Apr 2017 18:50:20 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 39C1F21954074; Thu, 20 Apr 2017 18:50:17 -0700 (PDT) Received: from mga11.intel.com (mga11.intel.com [192.55.52.93]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 73FE62195406F for ; Thu, 20 Apr 2017 18:50:15 -0700 (PDT) Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga102.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 20 Apr 2017 18:50:14 -0700 Received: from sfu5-mobl3.ccr.corp.intel.com ([10.239.193.185]) by fmsmga005.fm.intel.com with ESMTP; 20 Apr 2017 18:50:14 -0700 X-Original-To: edk2-devel@lists.01.org X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,227,1488873600"; d="scan'208";a="92064835" From: Fu Siyuan To: edk2-devel@lists.01.org Date: Fri, 21 Apr 2017 09:50:04 +0800 Message-Id: <1492739404-13540-1-git-send-email-siyuan.fu@intel.com> X-Mailer: git-send-email 2.7.4.windows.1 Subject: [edk2] [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib. X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ye Ting , Wu Jiaxin MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan Reviewed-by: Wu Jiaxin Reviewed-by: Ye Ting =20 --- MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Li= brary/DxeIpIoLib/DxeIpIoLib.c index 9a70e90..abc07fb 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -1028,6 +1028,12 @@ IpIoListenHandlerDpc ( } =20 if (IpIo->IpVersion =3D=3D IP_VERSION_4) { + if (IP4_IS_LOCAL_BROADCAST (EFI_IP4 (RxData->Ip4RxData.Header->SourceA= ddress))) { + // + // The source address is a broadcast address, discard it. + // + goto CleanUp; + } if ((EFI_IP4 (RxData->Ip4RxData.Header->SourceAddress) !=3D 0) && (IpIo->SubnetMask !=3D 0) && IP4_NET_EQUAL (IpIo->StationIp, EFI_NTOHL (((EFI_IP4_RECEIVE_DATA = *) RxData)->Header->SourceAddress), IpIo->SubnetMask) && --=20 2.7.4.windows.1 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel