Skip to content

Network: Fail start if network connection fails - #15

Open
ReverseStatic wants to merge 1 commit into
acidanthera:masterfrom
ReverseStatic:network-fail-start
Open

ReverseStatic wants to merge 1 commit into
acidanthera:masterfrom
ReverseStatic:network-fail-start

Conversation

@ReverseStatic

Copy link
Copy Markdown

HyperVNetwork::start() ignored the result of connectNetwork(), so the interface was attached and registered even when buffer setup failed and initializeRNDIS() never ran. When configd then enables the interface, the driver dereferences the null _rndisLock and panics:

panic(cpu 7 ...): Kernel trap at ..., type = 14=page fault
Panicked task ...: pid 93: configd
  mach_kernel : _IOLockLock + 0x3
  fish.goldfish64.MacHyperVSupport : HyperVNetwork::sendRNDISRequest + 0xb1
  fish.goldfish64.MacHyperVSupport : HyperVNetwork::setRNDISOID + 0x121
  fish.goldfish64.MacHyperVSupport : HyperVNetwork::setPacketFilter + 0x31
  fish.goldfish64.MacHyperVSupport : HyperVNetwork::enable + 0x3d

This change makes start() fail when the connection fails, so the guest boots without networking instead of panicking

This does not fix why the connection fails. In my case that was GPADL creation hitting HV_STATUS_INSUFFICIENT_BUFFERS, which #13 addresses; #12 may also be related

Tested on mac 15.8.1 vm on w11 (amd, 8 vcpus)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant