Hello!
I think I have a couple of data points more for this bug.
First of all, disabling ipv6.conf.(all|default).accept_ra
in /etc/sysctl.conf does not work reliably for three reasons:
(1) With systemd, there is no dependency between sysctl and
networking, so there is a race condition. I just reported it
as bug for procps (sorry, no bug number yet).
(2) conf.all.accept_ra seems to be ignored by the kernel
(actually, conf.all works only with a couple of options like
forwarding).
(3) conf.default.accept_ra does not help if the interface
already exists when systemd-sysctl.service runs.
Second, if /etc/network/interfaces specifies both IPv6 and
IPv6 addresses, the interface is already up when ifup sets
conf.$IFACE.accept_ra=0. Hence there is a small time window
when the RA can be accepted. Yes, our router is sometimes
fast enough to hit it ;)
I wonder what is the right solution... I see these possibilities:
(a) We could make ifup set accept_ra before it tries
to up the interface for the first time.
(b) ifup could explicitly flush routes with proto=ra
before setting up the default route.
(c) The kernel could drop such routes when accept_ra
is turned off.
Martin