]> git.proxmox.com Git - mirror_edk2.git/blobdiff - NetworkPkg/Mtftp6Dxe/Mtftp6Rrq.c
1. Add EFI_COMPONENT_NAME2_PROTOCOL.GetControllerName() support.
[mirror_edk2.git] / NetworkPkg / Mtftp6Dxe / Mtftp6Rrq.c
index 7fc613a6652b151fbe9ca9399bc3e3b3f6b8095e..4a481f4b46e0f3cb8c67394e170830a13a383dbf 100644 (file)
@@ -453,6 +453,7 @@ Mtftp6RrqHandleOack (
   MTFTP6_EXT_OPTION_INFO    ExtInfo;\r
   EFI_STATUS                Status;\r
   INTN                      Expected;\r
+  EFI_UDP6_PROTOCOL         *Udp6;\r
 \r
   *IsCompleted = FALSE;\r
 \r
@@ -555,6 +556,21 @@ Mtftp6RrqHandleOack (
                                  UDP_IO_UDP6_VERSION,\r
                                  Instance\r
                                  );\r
+        if (Instance->McastUdpIo != NULL) {\r
+          Status = gBS->OpenProtocol (\r
+                          Instance->McastUdpIo->UdpHandle,\r
+                          &gEfiUdp6ProtocolGuid,\r
+                          (VOID **) &Udp6,\r
+                          Instance->Service->Image,\r
+                          Instance->Handle,\r
+                          EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER\r
+                          );\r
+          if (EFI_ERROR (Status)) {\r
+            UdpIoFreeIo (Instance->McastUdpIo);\r
+            Instance->McastUdpIo = NULL;\r
+            return EFI_DEVICE_ERROR;\r
+          }\r
+        }\r
       }\r
 \r
       if (Instance->McastUdpIo == NULL) {\r