summaryrefslogtreecommitdiff
path: root/MdeModulePkg
diff options
context:
space:
mode:
authorxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-04 01:15:50 +0000
committerxdu2 <xdu2@6f19259b-4bc3-4df7-8a09-765794883524>2010-08-04 01:15:50 +0000
commitef89996c7089ab620f5a4c4ec00544e90e79e54e (patch)
treea3b6883fdd5fb261723707ce1c14b15e30e72f86 /MdeModulePkg
parent42a83e80f37c11a359e0fe78bb01e98225589b7d (diff)
downloadedk2-platforms-ef89996c7089ab620f5a4c4ec00544e90e79e54e.tar.xz
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
Diffstat (limited to 'MdeModulePkg')
-rw-r--r--MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c9
1 files changed, 8 insertions, 1 deletions
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) {