Consider eth0 with inet, inet6, dhclient and ip6.dhclient records. These
are currently ordered (alphabetically) as follows.

    eth0.dhclient
    eth0.inet
    eth0.inet6
    eth0.ip6.dhclient

Observations:
* IPv4 comes before IPv6
* The prioritization of *dhclient versus inet* is inconsistent.

I propose to change the order to the following.

    eth0.inet6
    eth0.inet
    eth0.ip6.dhclient
    eth0.dhclient

That is:
* IPv6 before IPv4
* inet before dhclient

Rationale:
* NetworkManager prioritizes IPv6 before IPv4
* Putting inet before dhclient allows "dns-nameservers" to be used to override 
addresses of faulty nameservers coming in via DHCP

Accordingly, here is a first draft of a new factory-shipped interface-
order file.

=== BEGIN ===
# interface-order(5)
lo.inet6
lo.inet
lo.@(dnsmasq|pdnsd)
lo.!(pdns|pdns-recursor)
lo
tun*
tap*
hso*
em+([0-9])?(_+([0-9]))*
p+([0-9])p+([0-9])?(_+([0-9]))*
eth*([^.]).inet6
eth*([^.]).inet
eth*([^.]).ip6.@(dhclient|dhcpcd|pump|udhcpc)
eth*([^.]).@(dhclient|dhcpcd|pump|udhcpc)
eth*
@(ath|wifi|wlan)*([^.]).inet6
@(ath|wifi|wlan)*([^.]).inet
@(ath|wifi|wlan)*([^.]).ip6.@(dhclient|dhcpcd|pump|udhcpc)
@(ath|wifi|wlan)*([^.]).@(dhclient|dhcpcd|pump|udhcpc)
@(ath|wifi|wlan)*
ppp*
*
=== END ===

Testing this by creating a bunch of fake records in a directory...

=== BEGIN ===
# /lib/resolvconf/list-records
lo.inet6
lo.inet
lo.dnsmasq
lo.pdnsd
lo
tun0
tap0
hso0
em0_0
p0p0_0
eth0.inet6
eth0.inet
eth0.ip6.dhclient
eth0.dhclient
wlan0.inet6
wlan0.inet
ath0.ip6.dhclient
wlan0.ip6.dhclient
ath0.dhclient
wlan0.dhclient
ppp0
ppp1
=== END ===

This probably needs some more tweaking.  I am not sure what to do about
tun, tap, hso and br so I haven't changed these.  The change that
worries me the most is putting eth0.inet before eth0.dhclient whereas
currently (resolvconf 1.69 and earlier) eth0.inet comes after
eth0.dhclient. I think that the change shouldn't affect too many people
because few people have a stanza like the following.

    iface eth0 inet dhcp
        dns-nameservers 1.2.3.4    # Overridden by DHCP-provided nameserver 
addresses

Comments and advice are most welcome.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1094345

Title:
  IPv6 DHCP record is too late in resolvconf interface-order

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1094345/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to