RFC 1534: Interoperation Between DHCP and BOOTP\r
RFC 3396: Encoding Long Options in DHCP.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
IN OUT EFI_DHCP4_CONFIG_DATA *Config\r
);\r
\r
+/**\r
+ Callback of Dhcp packet. Does nothing.\r
+\r
+ @param Arg The context.\r
+\r
+**/\r
+VOID\r
+EFIAPI\r
+DhcpDummyExtFree (\r
+ IN VOID *Arg\r
+ );\r
+\r
/**\r
Set the elapsed time based on the given instance and the pointer to the\r
elapsed time option.\r
/** @file\r
EFI DHCP protocol implementation.\r
\r
-Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.<BR>\r
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.<BR>\r
This program and the accompanying materials\r
are licensed and made available under the terms and conditions of the BSD License\r
which accompanies this distribution. The full text of the license may be found at\r
}\r
}\r
\r
-\r
-/**\r
- Release the packet.\r
-\r
- @param[in] Arg The packet to release\r
-\r
-**/\r
-VOID\r
-EFIAPI\r
-DhcpReleasePacket (\r
- IN VOID *Arg\r
- )\r
-{\r
- FreePool (Arg);\r
-}\r
-\r
-\r
/**\r
Release the net buffer when packet is sent.\r
\r
Packet->Dhcp4.Header.HwAddrLen\r
);\r
\r
-\r
//\r
// Wrap it into a netbuf then send it.\r
//\r
Frag.Bulk = (UINT8 *) &Packet->Dhcp4.Header;\r
Frag.Len = Packet->Length;\r
- Wrap = NetbufFromExt (&Frag, 1, 0, 0, DhcpReleasePacket, Packet);\r
+ Wrap = NetbufFromExt (&Frag, 1, 0, 0, DhcpDummyExtFree, NULL);\r
\r
if (Wrap == NULL) {\r
FreePool (Packet);\r
}\r
\r
ASSERT (UdpIo != NULL);\r
- NET_GET_REF (Wrap);\r
\r
Status = UdpIoSendDatagram (\r
UdpIo, \r
);\r
\r
if (EFI_ERROR (Status)) {\r
- NET_PUT_REF (Wrap);\r
+ NetbufFree (Wrap);\r
return EFI_ACCESS_DENIED;\r
}\r
\r
//\r
Frag.Bulk = (UINT8 *) &DhcpSb->LastPacket->Dhcp4.Header;\r
Frag.Len = DhcpSb->LastPacket->Length;\r
- Wrap = NetbufFromExt (&Frag, 1, 0, 0, DhcpReleasePacket, DhcpSb->LastPacket);\r
+ Wrap = NetbufFromExt (&Frag, 1, 0, 0, DhcpDummyExtFree, NULL);\r
\r
if (Wrap == NULL) {\r
return EFI_OUT_OF_RESOURCES;\r
}\r
- \r
+\r
//\r
// Broadcast the message, unless we know the server address.\r
//\r
\r
ASSERT (UdpIo != NULL);\r
\r
- NET_GET_REF (Wrap);\r
Status = UdpIoSendDatagram (\r
UdpIo,\r
Wrap,\r
);\r
\r
if (EFI_ERROR (Status)) {\r
- NET_PUT_REF (Wrap);\r
+ NetbufFree (Wrap);\r
return EFI_ACCESS_DENIED;\r
}\r
\r