// Route the packet unless overrided, that is, GateWay isn't zero.\r
//\r
if (IpInstance == NULL) {\r
- CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src);\r
+ CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, TRUE);\r
} else {\r
- CacheEntry = Ip4Route (IpInstance->RouteTable, Head->Dst, Head->Src);\r
+ CacheEntry = Ip4Route (IpInstance->RouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, FALSE);\r
//\r
// If failed to route the packet by using the instance's route table,\r
// try to use the default route table.\r
//\r
if (CacheEntry == NULL) {\r
- CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src);\r
+ CacheEntry = Ip4Route (IpSb->DefaultRouteTable, Head->Dst, Head->Src, IpIf->SubnetMask, TRUE);\r
}\r
}\r
\r
Fragment,\r
GateWay,\r
Ip4SysPacketSent,\r
- Packet\r
+ Packet,\r
+ IpSb\r
);\r
\r
if (EFI_ERROR (Status)) {\r
// upper layer's packets.\r
//\r
Ip4PrependHead (Packet, Head, Option, OptLen);\r
- Status = Ip4SendFrame (IpIf, IpInstance, Packet, GateWay, Callback, Context);\r
+ Status = Ip4SendFrame (IpIf, IpInstance, Packet, GateWay, Callback, Context, IpSb);\r
\r
if (EFI_ERROR (Status)) {\r
goto ON_ERROR;\r