[ovs-discuss] [OVN] router-preference in non periodic RA

Gabriele Cerami gcerami at redhat.com
Sat May 30 11:51:19 UTC 2020


Hi,

Currently, IPV6 Router Advertisements do not contain options like
router-preference when they are not set to be sent periodically, as
explained in https://bugzilla.redhat.com/show_bug.cgi?id=1804576

As a study topic, I'm trying to find a way to allow router to honour
ipv6_ra_config:router_preference.

I can see that when northd is building logical flows, it calls
copy_ra_to_sb to fill the sb database, but only if the options to send
them periodically is set.

My next step would be to change this function to fill sb db in all
cases, but I wanted to check how the RA packet is built and sent, and
what actively answers a received RS

The pinctrl thread code seems the right place, the packet is passed to
the router logic that builds a response.
I was expecting some OPCODE in controller/pinctrl.c:process_packet_in
but there's none referring to a RS.
I see the main entry point for RA is send_ipv6_ras. I can see it's
called periodically, I don't see it being called as a response to
something.
There are lots of instructions that deal with calculating the next time
to send the RA

I can see that copy_ra_to_sb already statically put all the proper
options in the config, like all the addresses on a router interface, but
essentially I worry about how the min/max intervals are handled at that
point, and if I can just set them to 0 when periodic is false.

At this point on my investigation, I have two ideas on how to approach this:

Either we rename functions like copy_ra_to_sb to copy_periodic_ra_to_sb,
clone its functionality to a copy_solicited_ra_to_sb, and handle its
case separately.
This means a lot of duplication but it's the most conservative on the
existing code.

-OR-

Modify copy_ra_to_sb and send_ipv6_ras to handle also the non periodic case.

I already added some marks on the code to identify places to change. But
still I'm probably missing informations, like if RA should be rate
limited, and we need to maintain a min_interval in any case, even if the
RA is not periodic (I'll try to find specifications for RA).

Any other insights on the code would be welcome.

Thanks.



More information about the discuss mailing list