#1064906 Connman manages vnet virtual ethernet interfaces and assigns direct default route when DHCP fails

Package:
connman
Source:
connman
Description:
Intel Connection Manager daemon
Submitter:
Pascal Hambourg
Date:
2024-02-27 15:09:04 UTC
Severity:
normal
#1064906#5
Date:
2024-02-27 14:57:08 UTC
From:
To:
* My use case:
I run a virtual machine with virt-manager (KVM/QEMU). Each time the
virtual machine is switched on, virt-manager creates a virtual ethernet
interface vnetN with a different number and MAC address on the host and
attaches it to the bridge virbr0. As a bridge member, vnetN is not
supposed to receive any IP configuration.
Connman was installed on the host with LXDE and manages the physical
ethernet and wireless interfaces with IPv4 and IPv6 automatic configuration.

* Problem description:
By default, connman manages vnetN with automatic methods and, after
failing to use DHCP, assigns it a link-local IPv4 address (APIPA
169.254.0.0/16) and a direct default IPv4 route with default metric (the
highest priority). This default route conflicts with the existing IPv4
default route associated with the physical network interface and breaks
the host IPv4 connectivity outside the LAN.

syslog:

ip addr:

ip route:

* Workaround:
Add "vnet" to NetworkInterfaceBlacklist in /etc/connman/main.conf.

* Comments/questions:
1) Isn't it desirable to ignore "vnet" interfaces in the default
configuration ? Or is there a use case where connman should manage vnet
interfaces ?

2) What is the use case for creating a direct default IPv4 route when
DHCP failed and an APIPA address was assigned, specially when another
default route already exists ? Communicating with other hosts in the
APIPA subnet on the same LAN does not require it. It may allow to send
packets to other hosts in non-APIPA subnets on the same LAN, but usually
they do not have a direct route to the APIPA subnet and are unable to reply.

3) If such use case exists, shouldn't this default route have a low
priority (high metric) so that other default routes take precedence ?