mirror of
https://github.com/acidanthera/audk.git
synced 2025-07-28 16:14:04 +02:00
Fix a bug in IP4 driver that the broadcast/multicast mac address is overrided by the gateway’s mac address.
Signed-off-by: Fu Siyuan <siyuan.fu@intel.com> Reviewed-by: Ye Ting <ting.ye@intel.com> Reviewed-by: Ouyang Qian <qian.ouyang@intel.com> git-svn-id: https://edk2.svn.sourceforge.net/svnroot/edk2/trunk/edk2@14167 6f19259b-4bc3-4df7-8a09-765794883524
This commit is contained in:
parent
a9b4ff8d01
commit
44a97ac647
@ -1,7 +1,7 @@
|
||||
/** @file
|
||||
Transmit the IP4 packet.
|
||||
|
||||
Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.<BR>
|
||||
Copyright (c) 2005 - 2013, Intel Corporation. All rights reserved.<BR>
|
||||
This program and the accompanying materials
|
||||
are licensed and made available under the terms and conditions of the BSD License
|
||||
which accompanies this distribution. The full text of the license may be found at
|
||||
@ -287,12 +287,7 @@ Ip4Output (
|
||||
return Status;
|
||||
}
|
||||
|
||||
//
|
||||
// Route the packet unless overrided, that is, GateWay isn't zero.
|
||||
//
|
||||
if (GateWay == IP4_ALLZERO_ADDRESS) {
|
||||
Dest = Head->Dst;
|
||||
|
||||
if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) {
|
||||
//
|
||||
// Set the gateway to local broadcast if the Dest is
|
||||
@ -309,9 +304,9 @@ Ip4Output (
|
||||
//
|
||||
GateWay = Head->Dst;
|
||||
|
||||
} else {
|
||||
} else if (GateWay == IP4_ALLZERO_ADDRESS) {
|
||||
//
|
||||
// Consult the route table to route the packet
|
||||
// Route the packet unless overrided, that is, GateWay isn't zero.
|
||||
//
|
||||
if (IpInstance == NULL) {
|
||||
CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src);
|
||||
@ -326,7 +321,6 @@ Ip4Output (
|
||||
GateWay = CacheEntry->NextHop;
|
||||
Ip4FreeRouteCacheEntry (CacheEntry);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// OK, selected the source and route, fragment the packet then send
|
||||
|
Loading…
x
Reference in New Issue
Block a user