From ef89996c7089ab620f5a4c4ec00544e90e79e54e Mon Sep 17 00:00:00 2001 From: xdu2 Date: Wed, 4 Aug 2010 01:15:50 +0000 Subject: [PATCH] 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 --- MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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) {