Default route selection by odhcp6c service

Xiaomi Mi Router AX3000T (OpenWrt 23.05.5 r24106-10cc5fcd00)

I would like to understand how odhcp6c chooses the default route if several devices send Router Advertisement (RA).

The tcpdump output does not show that the router announces itself as the default route, but the correct gateway sends an RA with the [managed, other stateful] flags and a large router lifetime. In my opinion, this should be considered a higher priority than the second router, which only announces rdnss.

However, odhcp6c adds the default route via fe80::1 in all cases, regardless of the settings. fakeroute is disabled.

config interface 'wan6'
        option device 'wan'
        option proto 'dhcpv6'
        option reqaddress 'true'
        option reqprefix 'auto'
        option ra_holdoff '5'
        option fakeroute '0'
        option defaultroute '1'
root@OpenWrt:~# tcpdump -vvvv -ttt -xxx -i wan icmp6 and 'ip6[40] = 134'
tcpdump: listening on wan, link-type EN10MB (Ethernet), snapshot length 262144 bytes
 00:00:00.000000 IP6 (class 0xc0, hlim 255, next-header ICMPv6 (58) payload length: 24) fe80::e230:f9ff:fe81:f869 > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 24
        hop limit 64, Flags [managed, other stateful], pref medium, router lifetime 9000s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): e0:30:f9:81:f8:69
            0x0000:  e030 f981 f869
        0x0000:  3333 0000 0001 e030 f981 f869 86dd 6c00
        0x0010:  0000 0018 3aff fe80 0000 0000 0000 e230
        0x0020:  f9ff fe81 f869 ff02 0000 0000 0000 0000
        0x0030:  0000 0000 0001 8600 7205 40c0 2328 0000
        0x0040:  0000 0000 0000 0101 e030 f981 f869
 00:00:00.002553 IP6 (hlim 255, next-header ICMPv6 (58) payload length: 56) fe80::1 > ip6-allnodes: [icmp6 sum ok] ICMP6, router advertisement, length 56
        hop limit 255, Flags [other stateful], pref medium, router lifetime 1800s, reachable time 0ms, retrans timer 0ms
          source link-address option (1), length 8 (1): a0:94:6a:87:51:91
            0x0000:  a094 6a87 5191
          rdnss option (25), length 24 (3):  lifetime 4294967295s, addr: fe80::1
            0x0000:  0000 ffff ffff fe80 0000 0000 0000 0000
            0x0010:  0000 0000 0001
          mtu option (5), length 8 (1):  1500
            0x0000:  0000 0000 05dc
        0x0000:  3333 0000 0001 a094 6a87 5191 86dd 6000
        0x0010:  0000 0038 3aff fe80 0000 0000 0000 0000
        0x0020:  0000 0000 0001 ff02 0000 0000 0000 0000
        0x0030:  0000 0000 0001 8600 f5ad ff40 0708 0000
        0x0040:  0000 0000 0000 0101 a094 6a87 5191 1903
        0x0050:  0000 ffff ffff fe80 0000 0000 0000 0000
        0x0060:  0000 0000 0001 0501 0000 0000 05dc
ip -6 route
default from 2a00:*:*::* via fe80::1 dev wan proto static metric 512 pref medium
default from 2a00:*:*:*::/64 via fe80::1 dev wan proto static metric 512 pref medium