VirtualBox

Changeset 91466 in vbox


Ignore:
Timestamp:
Sep 29, 2021 4:57:26 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
147150
Message:

VMNet: bugref:9932 Fixed uninitialized max_packet_size, really enabled VBOX_WITH_VMNET, minor log improvements

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Config.kmk

    r91444 r91466  
    847847VBOX_WITH_CLOUD_NET = 1
    848848# Use Mac OS X VMNET API instead of network kernel extensions
    849 ifeq ($(KBUILD_TARGET),darwin)
    850  # Ignore VMNET for special builds
    851  if !defined(VBOX_ONLY_VALIDATIONKIT) && !defined(VBOX_ONLY_ADDITIONS) && !defined(VBOX_ONLY_DOCS) && !defined(VBOX_ONLY_EXTPACKS)
    852   # VMNET can only be compiled with the newer Xcode
    853   ifdef VBOX_WITH_EVEN_NEWER_XCODE
    854    # Comment out VBOX_WITH_VMNET to use old-style network kernel extensions
    855    VBOX_WITH_VMNET = 1
    856    ifdef VBOX_WITH_VMNET
    857     # Use SDK 10.15
    858     VBOX_DEF_MACOSX_VERSION_MIN=10.15# Catalina
    859    endif
    860   endif
    861  endif
    862 endif
     849VBOX_WITH_VMNET = 1
    863850## @}
    864851
     
    24022389VBOX_GOOD_COMSPEC = $(subst \,/,$(SystemRoot))/System32/cmd.exe
    24032390VBOX_GOOD_COMSPEC_BS ?= $(subst /,\,$(VBOX_GOOD_COMSPEC))
     2391
     2392# Disable VMNET depending on platform / build / LocalConfig.kmk settings
     2393ifneq ($(KBUILD_TARGET),darwin)
     2394 VBOX_WITH_VMNET=
     2395endif
     2396# Disable VMNET for special builds
     2397if defined(VBOX_ONLY_VALIDATIONKIT) || defined(VBOX_ONLY_ADDITIONS) || defined(VBOX_ONLY_DOCS) || defined(VBOX_ONLY_EXTPACKS)
     2398 VBOX_WITH_VMNET=
     2399endif
     2400# VMNET can only be compiled with the newer Xcode
     2401ifndef VBOX_WITH_EVEN_NEWER_XCODE
     2402 VBOX_WITH_VMNET=
     2403endif
     2404# Force SDK 10.15 for VMNET
     2405ifdef VBOX_WITH_VMNET
     2406 VBOX_DEF_MACOSX_VERSION_MIN=10.15# Catalina
     2407endif
    24042408
    24052409#
  • trunk/src/VBox/Devices/Network/DrvVMNet.m

    r91442 r91466  
    374374                Log(("drvVMNetAttachBridged: Failed to convert '%s' to MAC address (%Rrc)\n", pcszMacAddress ? pcszMacAddress : "(null)", rc));
    375375#endif
     376            max_packet_size = xpc_dictionary_get_uint64(interface_param, vmnet_max_packet_size_key);
    376377#ifdef LOG_ENABLED
    377             max_packet_size = xpc_dictionary_get_uint64(interface_param, vmnet_max_packet_size_key);
    378378            // Log(("MAC address: %s\n", xpc_dictionary_get_string(interface_param, vmnet_mac_address_key)));
    379379            Log(("Max packet size: %zu\n", max_packet_size));
     
    399399        return VMNET_FAILURE;
    400400    }
     401
     402    LogRel(("VMNET: Max packet size is %zu\n", max_packet_size));
    401403
    402404    vmnet_interface_set_event_callback(pThis->Interface, VMNET_INTERFACE_PACKETS_AVAILABLE, pThis->InterfaceQueue, ^(interface_event_t event_mask, xpc_object_t  _Nonnull event) {
     
    420422            rc = vmnet_read(pThis->Interface, &packets, &packet_count);
    421423            if (rc != VMNET_SUCCESS)
    422                 Log(("Failed to read packets\n"));
     424                Log(("Failed to read packets, rc=%d\n", rc));
    423425            else
    424426            {
     
    570572
    571573            pThis->uMode = VMNET_HOST_MODE;
    572             LogRel(("VMNet: host network with mask %s (%s to %s)\n", pThis->szNetworkMask, pThis->szLowerIP, pThis->szUpperIP));
     574            LogRel(("VMNet: Host network with mask %s (%s to %s)\n", pThis->szNetworkMask, pThis->szLowerIP, pThis->szUpperIP));
    573575            break;
    574576
     
    582584                                        N_("Configuration error: Failed to get the \"Trunk\" value"));
    583585            pThis->uMode = VMNET_BRIDGED_MODE;
    584             LogRel(("VMNet: bridge to %s\n", pThis->szHostInterface));
     586            LogRel(("VMNet: Bridge to %s\n", pThis->szHostInterface));
    585587            break;
    586588
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette