Re: [PATCH net-next] tap: report IFF_DETACH_QUEUE in TUNGETIFF

From: Willem de Bruijn

Date: Wed Sep 30 2026 - 11:46:40 EST


Umang Pokhriyal wrote:
> tun sets IFF_DETACH_QUEUE in the flags returned by TUNGETIFF when the
> queue is detached, since commit 3d407a80b62f ("tun: Report whether the
> queue is attached or not"). tap_ioctl() returns only q->flags, so a
> detached macvtap or ipvtap queue is reported as attached.
>
> Cloud Hypervisor ran into this when checking queue state on macvtap.
>
> Report the flag from q->enabled, as tun does.
>
> Assisted-by: LLM
> Signed-off-by: Umang Pokhriyal <umangpokhriyall@xxxxxxxxx>

Reviewed-by: Willem de Bruijn <willemb@xxxxxxxxxx>