+ if (AddrIsUnspecified(&Remote)) {
+ Status = STATUS_UNSUCCESSFUL;
+ goto Exit;
+ }
+
+ Interface = AddrLocateInterface(&Remote);
+ if (Interface) {
+ PVOID OutputBuffer;
+
+ if (Interface->AddressLength > IrpSp->Parameters.DeviceIoControl.OutputBufferLength) {
+ Status = STATUS_INVALID_BUFFER_SIZE;
+ goto Exit;
+ }
+
+ OutputBuffer = Irp->AssociatedIrp.SystemBuffer;
+ RtlCopyMemory(OutputBuffer, Interface->Address, Interface->AddressLength);
+ Irp->IoStatus.Information = Interface->AddressLength;
+ Status = STATUS_SUCCESS;
+ goto Exit;
+ }
+