Le 17/06/2018 à 22:57, Sebastian Benoit a écrit :

you have to do check

   if (rtm->rtm_flags & RTF_CONNECTED)

The priority of a connected route depends on the interface priority,
see ifconfig(8) on the priority option and wifi and carp interfaces have a
different default prio than other interfacs. So the prio is not an indicator
for the type of the route.

/Benno

                /* sanity check for plen */
                /* as RFC2373, prefixlen is at least 4 */
                if (plen < 4 || plen > 127) {


Hello,

The patch indeed prevent including ospf6d-learned route to be advertised by rtadvd, as priority is 32 (RTP_OSPF).

I had to add a check on RTM_DELETE: case too, as ospf6d add (an remove) routes on itself, see this:

fremen# route -n show -inet6|grep ac42
2a01:e35:8aea:ac42::/64 2a01:e35:8aea:ac42:200:24ff:fed1:420d UCn 1 2 - 4 em1 2a01:e35:8aea:ac42::/64 link#2 UC 0 0 - 32 em1

2a01:e35:8aea:ac42:200:24ff:fed1:420d is em1 address.

without checking priority on RTM_DELETE, stopping ospf6d removes all prefixes ...


checking rtm_flags & RTF_CONNECTED works too, as Sebastien said.
dhcpv6-pd works regardless of the check (I run it on this router).

--
Bastien

Reply via email to