git: 4ae5bdb642f7 - 2025Q4 - emulators/virtualbox-ose-additions*: Fix "vboxmanage guestproperty" on host does not show interface name for FreeBSD guest
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Fri, 21 Nov 2025 16:02:27 UTC
The branch 2025Q4 has been updated by vvd:
URL: https://cgit.FreeBSD.org/ports/commit/?id=4ae5bdb642f7f804f528a9536119e30316caee13
commit 4ae5bdb642f7f804f528a9536119e30316caee13
Author: Vladimir Druzenko <vvd@FreeBSD.org>
AuthorDate: 2025-11-21 15:54:34 +0000
Commit: Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2025-11-21 16:02:12 +0000
emulators/virtualbox-ose-additions*: Fix "vboxmanage guestproperty" on host does not show interface name for FreeBSD guest
Upstream issue:
https://github.com/VirtualBox/virtualbox/issues/403
Upstream commit:
https://github.com/VirtualBox/virtualbox/commit/3cf64726847e2483c9539ca51c88862a0f1c7414
PR: 291128
MFH: 2025Q4
(cherry picked from commit 89de71b8c7759fb3f75fe9d92170e76d94d3e32b)
---
...itions_common_VBoxService_VBoxServiceVMInfo.cpp | 32 ++++++++++++++-----
...itions_common_VBoxService_VBoxServiceVMInfo.cpp | 36 ++++++++++++++++------
...itions_common_VBoxService_VBoxServiceVMInfo.cpp | 18 ++++++++++-
emulators/virtualbox-ose-additions-legacy/Makefile | 2 +-
.../virtualbox-ose-additions-nox11-legacy/Makefile | 2 +-
emulators/virtualbox-ose-additions-nox11/Makefile | 2 +-
emulators/virtualbox-ose-additions/Makefile | 2 +-
...itions_common_VBoxService_VBoxServiceVMInfo.cpp | 20 ++++++++++--
...itions_common_VBoxService_VBoxServiceVMInfo.cpp | 18 ++++++++++-
9 files changed, 106 insertions(+), 26 deletions(-)
diff --git a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
index 70b459e94da7..03027b3dc445 100644
--- a/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
+++ b/emulators/virtualbox-ose-70/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
@@ -1,6 +1,6 @@
---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-04-11 12:02:56 UTC
+++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
-@@ -67,8 +67,8 @@
+@@ -77,8 +77,8 @@
# include <net/if.h>
# include <pwd.h> /* getpwuid */
# include <unistd.h>
@@ -11,7 +11,7 @@
# endif
# ifdef RT_OS_OS2
# include <net/if_dl.h>
-@@ -528,7 +528,7 @@ static void vgsvcVMInfoWriteFixedProperties(void)
+@@ -535,7 +535,7 @@ static void vgsvcVMInfoWriteFixedProperties(void)
}
@@ -20,7 +20,7 @@
/*
* Simple wrapper to work around compiler-specific va_list madness.
*/
-@@ -555,12 +555,6 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -562,12 +562,6 @@ static int vgsvcVMInfoWriteUsers(void)
#ifdef RT_OS_WINDOWS
rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList);
@@ -33,7 +33,7 @@
#elif defined(RT_OS_HAIKU)
/** @todo Haiku: Port logged on user info retrieval. */
rc = VERR_NOT_IMPLEMENTED;
-@@ -586,7 +580,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -593,7 +587,7 @@ static int vgsvcVMInfoWriteUsers(void)
while ( (ut_user = getutxent())
&& RT_SUCCESS(rc))
{
@@ -42,7 +42,7 @@
VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid);
# else
VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n",
-@@ -621,7 +615,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -628,7 +622,7 @@ static int vgsvcVMInfoWriteUsers(void)
}
# ifdef VBOX_WITH_DBUS
@@ -51,7 +51,7 @@
DBusError dbErr;
DBusConnection *pConnection = NULL;
int rc2 = RTDBusLoadLib();
-@@ -830,7 +824,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -837,7 +831,7 @@ static int vgsvcVMInfoWriteUsers(void)
if ( fHaveLibDbus
&& dbus_error_is_set(&dbErr))
dbus_error_free(&dbErr);
@@ -60,7 +60,7 @@
# endif /* VBOX_WITH_DBUS */
/** @todo Fedora/others: Handle systemd-loginctl. */
-@@ -867,7 +861,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -874,7 +868,7 @@ static int vgsvcVMInfoWriteUsers(void)
RTMemFree(papszUsers);
endutxent(); /* Close utmpx file. */
@@ -69,3 +69,19 @@
Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+@@ -1168,6 +1162,15 @@ static int vgsvcVMInfoWriteNetwork(void)
+
+ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported);
+ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down");
++
++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */
++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported);
++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name);
++ if (RT_SUCCESS(rc2))
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name);
++ else
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL);
++# endif
+
+ cIfsReported++;
+ }
diff --git a/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
index 70b459e94da7..7a52a9103251 100644
--- a/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
+++ b/emulators/virtualbox-ose-71/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
@@ -1,6 +1,6 @@
---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-10-16 14:25:31 UTC
+++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
-@@ -67,8 +67,8 @@
+@@ -77,8 +77,8 @@
# include <net/if.h>
# include <pwd.h> /* getpwuid */
# include <unistd.h>
@@ -11,16 +11,16 @@
# endif
# ifdef RT_OS_OS2
# include <net/if_dl.h>
-@@ -528,7 +528,7 @@ static void vgsvcVMInfoWriteFixedProperties(void)
+@@ -573,7 +573,7 @@ static void vgsvcVMInfoWriteFixedProperties(void)
}
-#if defined(VBOX_WITH_DBUS) && defined(RT_OS_LINUX) /* Not yet for Solaris/FreeBSB. */
+#if defined(VBOX_WITH_DBUS) && (defined(RT_OS_LINUX) || defined(RT_OS_FREEBSD)) /* Not yet for Solaris. */
/*
- * Simple wrapper to work around compiler-specific va_list madness.
+ * Simple wrappers to work around compiler-specific va_list madness.
*/
-@@ -555,12 +555,6 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -702,12 +702,6 @@ static int vgsvcVMInfoWriteUsers(void)
#ifdef RT_OS_WINDOWS
rc = VGSvcVMInfoWinWriteUsers(&g_VMInfoPropCache, &pszUserList, &cUsersInList);
@@ -33,7 +33,7 @@
#elif defined(RT_OS_HAIKU)
/** @todo Haiku: Port logged on user info retrieval. */
rc = VERR_NOT_IMPLEMENTED;
-@@ -586,7 +580,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -733,7 +727,7 @@ static int vgsvcVMInfoWriteUsers(void)
while ( (ut_user = getutxent())
&& RT_SUCCESS(rc))
{
@@ -42,7 +42,7 @@
VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32)\n", ut_user->ut_user, ut_user->ut_type, ut_user->ut_pid);
# else
VGSvcVerbose(4, "Found entry '%s' (type: %d, PID: %RU32, session: %RU32)\n",
-@@ -621,7 +615,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -749,7 +743,7 @@ static int vgsvcVMInfoWriteUsers(void)
}
# ifdef VBOX_WITH_DBUS
@@ -51,7 +51,7 @@
DBusError dbErr;
DBusConnection *pConnection = NULL;
int rc2 = RTDBusLoadLib();
-@@ -830,7 +824,7 @@ static int vgsvcVMInfoWriteUsers(void)
+@@ -1074,7 +1068,7 @@ static int vgsvcVMInfoWriteUsers(void)
if ( fHaveLibDbus
&& dbus_error_is_set(&dbErr))
dbus_error_free(&dbErr);
@@ -59,8 +59,8 @@
+# endif /* RT_OS_LINUX || RT_OS_FREEBSD */
# endif /* VBOX_WITH_DBUS */
- /** @todo Fedora/others: Handle systemd-loginctl. */
-@@ -867,7 +861,7 @@ static int vgsvcVMInfoWriteUsers(void)
+ /* Calc the string length. */
+@@ -1109,7 +1103,7 @@ static int vgsvcVMInfoWriteUsers(void)
RTMemFree(papszUsers);
endutxent(); /* Close utmpx file. */
@@ -69,3 +69,19 @@
Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+@@ -1403,6 +1397,15 @@ static int vgsvcVMInfoWriteNetwork(void)
+
+ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported);
+ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down");
++
++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */
++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported);
++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name);
++ if (RT_SUCCESS(rc2))
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name);
++ else
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL);
++# endif
+
+ cIfsReported++;
+ }
diff --git a/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
index 0c463e3d9923..a6b7c5d6285c 100644
--- a/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
+++ b/emulators/virtualbox-ose-72/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
@@ -1,4 +1,4 @@
---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-08-13 19:41:16 UTC
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2025-10-17 08:52:40 UTC
+++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
@@ -77,8 +77,8 @@
# include <net/if.h>
@@ -69,3 +69,19 @@
Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+@@ -1403,6 +1397,15 @@ static int vgsvcVMInfoWriteNetwork(void)
+
+ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported);
+ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down");
++
++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */
++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported);
++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name);
++ if (RT_SUCCESS(rc2))
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name);
++ else
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL);
++# endif
+
+ cIfsReported++;
+ }
diff --git a/emulators/virtualbox-ose-additions-legacy/Makefile b/emulators/virtualbox-ose-additions-legacy/Makefile
index e9067d5fd9b4..da59aef65d43 100644
--- a/emulators/virtualbox-ose-additions-legacy/Makefile
+++ b/emulators/virtualbox-ose-additions-legacy/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 5.2.44
-PORTREVISION?= 8
+PORTREVISION?= 9
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/
PKGNAMESUFFIX?= -additions-legacy
diff --git a/emulators/virtualbox-ose-additions-nox11-legacy/Makefile b/emulators/virtualbox-ose-additions-nox11-legacy/Makefile
index c02115f2eb3b..7fef05133b84 100644
--- a/emulators/virtualbox-ose-additions-nox11-legacy/Makefile
+++ b/emulators/virtualbox-ose-additions-nox11-legacy/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION= 7
+PORTREVISION= 9
PKGNAMESUFFIX= -additions-nox11-legacy
MASTERDIR= ${.CURDIR}/../virtualbox-ose-additions-legacy
diff --git a/emulators/virtualbox-ose-additions-nox11/Makefile b/emulators/virtualbox-ose-additions-nox11/Makefile
index be1a45194f0a..a13626bde395 100644
--- a/emulators/virtualbox-ose-additions-nox11/Makefile
+++ b/emulators/virtualbox-ose-additions-nox11/Makefile
@@ -1,4 +1,4 @@
-PORTREVISION= 1
+PORTREVISION= 3
PKGNAMESUFFIX= -additions-nox11
MASTERDIR= ${.CURDIR}/../virtualbox-ose-additions
diff --git a/emulators/virtualbox-ose-additions/Makefile b/emulators/virtualbox-ose-additions/Makefile
index 2e5c8cc62bf2..c837aeeccf71 100644
--- a/emulators/virtualbox-ose-additions/Makefile
+++ b/emulators/virtualbox-ose-additions/Makefile
@@ -1,6 +1,6 @@
PORTNAME= virtualbox-ose
DISTVERSION= 6.1.50
-PORTREVISION?= 2
+PORTREVISION?= 3
CATEGORIES= emulators
MASTER_SITES= https://download.virtualbox.org/virtualbox/${DISTVERSION}/
PKGNAMESUFFIX?= -additions
diff --git a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
index 8f6810a5bc82..bfcd88c67974 100644
--- a/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
+++ b/emulators/virtualbox-ose-legacy/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
@@ -1,4 +1,4 @@
---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2017-03-08 17:15:20 UTC
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2020-07-09 16:50:08 UTC
+++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
@@ -71,8 +71,8 @@
# include <net/if.h>
@@ -11,7 +11,7 @@
# endif
# ifdef RT_OS_OS2
# include <net/if_dl.h>
-@@ -531,7 +531,7 @@ static void vgsvcVMInfoWriteFixedPropert
+@@ -531,7 +531,7 @@ static void vgsvcVMInfoWriteFixedProperties(void)
}
@@ -69,3 +69,19 @@
Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+@@ -1152,6 +1146,15 @@ static int vgsvcVMInfoWriteNetwork(void)
+
+ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported);
+ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down");
++
++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */
++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported);
++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name);
++ if (RT_SUCCESS(rc2))
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name);
++ else
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL);
++# endif
+
+ cIfsReported++;
+ }
diff --git a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
index 70b459e94da7..b1ccef033ff1 100644
--- a/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
+++ b/emulators/virtualbox-ose/files/patch-src_VBox_Additions_common_VBoxService_VBoxServiceVMInfo.cpp
@@ -1,4 +1,4 @@
---- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2021-01-07 15:34:20 UTC
+--- src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp.orig 2024-01-11 12:11:39 UTC
+++ src/VBox/Additions/common/VBoxService/VBoxServiceVMInfo.cpp
@@ -67,8 +67,8 @@
# include <net/if.h>
@@ -69,3 +69,19 @@
Assert(RT_FAILURE(rc) || cUsersInList == 0 || (pszUserList && *pszUserList));
+@@ -1154,6 +1148,15 @@ static int vgsvcVMInfoWriteNetwork(void)
+
+ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Status", cIfsReported);
+ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, pIfCurr->ifa_flags & IFF_UP ? "Up" : "Down");
++
++# ifdef RT_OS_FREEBSD /** @todo Check the other guests. */
++ RTStrPrintf(szPropPath, sizeof(szPropPath), "/VirtualBox/GuestInfo/Net/%RU32/Name", cIfsReported);
++ int rc2 = RTStrValidateEncoding(pIfCurr->ifa_name);
++ if (RT_SUCCESS(rc2))
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, "%s", pIfCurr->ifa_name);
++ else
++ VGSvcPropCacheUpdate(&g_VMInfoPropCache, szPropPath, NULL);
++# endif
+
+ cIfsReported++;
+ }