Skip to content

core: initialize the DNS priority when merging l3cds

Beniamino Galvani requested to merge bg/l3cd-dns-priority into main

When merging multiple l3cds, the resulting l3cd has a DNS priority set only when one of the original l3cds has. So, we must ensure that at least one l3cd gets a DNS priority, otherwise the resulting l3cd will be ignored by the DNS manager.

Usually that's done by setting the priority from the profile on the ipmanual l3cd; however, some devices like modem skip the manual method.

To solve this problem, in the past we did b2e559fa ('core: initialize l3cd dns-priority for ppp and wwan') and 6991333b ('ppp-manager: ip6: fix dns not being used') to explicitly initialize a default priority for WWAN-PPP and WWAN-static l3cds, but that doesn't cover the WWAN-DHCP case.

Use a different approach; whenever we merge l3cds, ensure that the priority is set if there is DNS-related information.

Fixes: 58287cbc ('core: rework IP configuration in NetworkManager using layer 3 configuration')

#1045 (closed)

Merge request reports