From: xdu2 Date: Wed, 4 Aug 2010 01:15:50 +0000 (+0000) Subject: Update MnpDxe to deliver VLAN tagged packet even when there is no VLAN is configured... X-Git-Tag: edk2-stable201903~15626 X-Git-Url: https://git.proxmox.com/?a=commitdiff_plain;ds=sidebyside;h=ef89996c7089ab620f5a4c4ec00544e90e79e54e;p=mirror_edk2.git Update MnpDxe to deliver VLAN tagged packet even when there is no VLAN is configured through VlanConfig protocol, this ensure that interesting applications could still get chance to receive all layer 2 frames. git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@10771 6f19259b-4bc3-4df7-8a09-765794883524 --- diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c index 28349bc438..1aa3207ea3 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c @@ -944,7 +944,14 @@ MnpReceivePacket ( } VlanId = 0; - IsVlanPacket = MnpRemoveVlanTag (MnpDeviceData, Nbuf, &VlanId); + if (MnpDeviceData->NumberOfVlan != 0) { + // + // VLAN is configured, remove the VLAN tag if any + // + IsVlanPacket = MnpRemoveVlanTag (MnpDeviceData, Nbuf, &VlanId); + } else { + IsVlanPacket = FALSE; + } MnpServiceData = MnpFindServiceData (MnpDeviceData, VlanId); if (MnpServiceData == NULL) {