What does NTSTATUS 0xC000A085 (STATUS_WRONG_COMPARTMENT) mean?

 
Previous Next
STATUS_XMLDSIG_ERROR STATUS_AUTHIP_FAILURE

STATUS_WRONG_COMPARTMENT

The connection request used the wrong routing compartment

Windows routing compartments isolate interface, route, and neighbor state for different networking contexts. A socket, WFP operation, or injected packet must use the compartment associated with its endpoint and original traffic. This status reports a mismatch between the caller context and the target compartment.

The same destination address can resolve through different routes in different compartments, so changing only the interface index is not sufficient. Preserve the compartment identifier from incoming metadata and perform creation or reinjection in that context. This is especially important for VPN, container, and virtual-switch paths.

What to inspect

  • Record the endpoint compartment and the compartment supplied by the caller.
  • Preserve the original compartment when cloning or reinjecting packets.
  • Inspect VPN, container, and virtual-network interface route tables separately.

References


Looking for a different code? Search another status or error code.