When IPV6CP is enabled, MPD tries to add a link-local (fe80:) address to the ng interface as soon as IPV6CP comes up. However, if IPCP comes up before IPV6CP, the FreeBSD kernel will add the link-local address by itself (subject to net.inet6.ip6.auto_linklocal, which is normally enabled), and then MPD fails to add the same address, bringing IPV6CP down again and logging the following errors:
mpd: [B1] IFACE: Adding IPv6 address to ng0 failed: File exists
kernel: ifa_add_loopback_route: insertion failed
mpd: [B1] IFACE: IfaceChangeAddr() failed, closing IPv6CP
mpd: [B1] IPV6CP: parameter negotiation failed
mpd: [B1] IPV6CP: state change Opened --> Stopping
The attached patch simply makes MPD ignore the error when SIOCAIFADDR_IN6 fails with EEXIST (the ifa_add_loopback_route message from the kernel will still appear, but without any negative effect). Perhaps there's a better solution, but this seems to work fine for the m0n0wall project.