From 837948ff24bf15d73dfcfa29d35680e81e357ab1 Mon Sep 17 00:00:00 2001 From: Rom Walton Date: Fri, 22 Aug 2014 15:22:39 -0400 Subject: [PATCH] VBOX: Use the 'Name' field instead of the internal virtualbox name for the default network interface. --- samples/vboxwrapper/vbox.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/samples/vboxwrapper/vbox.cpp b/samples/vboxwrapper/vbox.cpp index 1978e9c5c9..2803bb0809 100644 --- a/samples/vboxwrapper/vbox.cpp +++ b/samples/vboxwrapper/vbox.cpp @@ -2112,11 +2112,11 @@ int VBOX_VM::get_default_network_interface(string& iface) { // Status: Up // VBoxNetworkName: HostInterfaceNetworking-Intel(R) Ethernet Connection I217-V - if_start = output.find("VBoxNetworkName:"); + if_start = output.find("Name:"); if (if_start == string::npos) { return ERR_NOT_FOUND; } - if_start += strlen("VBoxNetworkName:"); + if_start += strlen("Name:"); if_end = output.find("\n", if_start); iface = output.substr(if_start, if_end - if_start); strip_whitespace(iface);