From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 977A52195406F for ; Thu, 20 Apr 2017 18:59:45 -0700 (PDT) Received: from fmsmga003.fm.intel.com ([10.253.24.29]) by orsmga104.jf.intel.com with ESMTP; 20 Apr 2017 18:59:45 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.37,228,1488873600"; d="scan'208";a="848236310" Received: from fmsmsx106.amr.corp.intel.com ([10.18.124.204]) by FMSMGA003.fm.intel.com with ESMTP; 20 Apr 2017 18:59:45 -0700 Received: from fmsmsx101.amr.corp.intel.com (10.18.124.199) by FMSMSX106.amr.corp.intel.com (10.18.124.204) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 18:59:44 -0700 Received: from shsmsx101.ccr.corp.intel.com (10.239.4.153) by fmsmsx101.amr.corp.intel.com (10.18.124.199) with Microsoft SMTP Server (TLS) id 14.3.319.2; Thu, 20 Apr 2017 18:59:44 -0700 Received: from shsmsx103.ccr.corp.intel.com ([169.254.4.117]) by SHSMSX101.ccr.corp.intel.com ([169.254.1.193]) with mapi id 14.03.0319.002; Fri, 21 Apr 2017 09:59:42 +0800 From: "Ye, Ting" To: "Fu, Siyuan" , "edk2-devel@lists.01.org" CC: "Wu, Jiaxin" Thread-Topic: [edk2] [Patch] MdeModulePkg: Discard received broadcast message in DxeIpIpLib. Thread-Index: AQHSukGlPXAHwl7cy0u9G3DH6bb1haHPENrg Date: Fri, 21 Apr 2017 01:59:42 +0000 Message-ID: References: <1492739404-13540-1-git-send-email-siyuan.fu@intel.com> In-Reply-To: <1492739404-13540-1-git-send-email-siyuan.fu@intel.com> Accept-Language: zh-CN, en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.239.127.40] MIME-Version: 1.0 Subject: Re: [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: , X-List-Received-Date: Fri, 21 Apr 2017 01:59:45 -0000 Content-Language: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Looks good to me. Please correct your patch title to DxeIpIoLib if it will = be included in the check-in log. Reviewed-by: Ye Ting =20 Thanks, Ting -----Original Message----- From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] On Behalf Of Fu S= iyuan Sent: Friday, April 21, 2017 9:50 AM To: edk2-devel@lists.01.org Cc: Ye, Ting ; Wu, Jiaxin Subject: [edk2] [Patch] MdeModulePkg: Discard received broadcast message in= DxeIpIpLib. Cc: Ye Ting Cc: Wu Jiaxin Contributed-under: TianoCore Contribution Agreement 1.0 Signed-off-by: Fu Siyuan --- 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