On Thu, Mar 28, 2024 at 3:03 PM Dumitru Ceara <dce...@redhat.com> wrote: > > On 3/18/24 22:21, Mark Michelson wrote: > > Thanks Frode, looks good to me. > > > > Acked-by: Mark Michelson <mmich...@redhat.com> > > > > On 3/18/24 07:43, Frode Nordahl wrote: > >> The current code puts the contents of the ``ipb6_ra_pd_list`` > >> option verbatim into the ``ipv6_ra_prefixes`` option. > >> > >> This does not work, because the ``ipv6_ra_pd_list`` is not an IPv6 > >> prefix, but a string composed of aid:prefix/length, and as a > >> consequence the controller would log a message like this: > >> > >> pinctrl|WARN|Invalid IPv6 prefixes: 18578:fde8:7f0f:11fe:8::/62 > >> > >> Northd already parses the ``ipv6_ra_pd_list`` string and > >> populates the ``ipv6_prefix`` list of strings. > >> > >> Make use of the ``ipv6_prefix`` list of strings to populate the > >> ``ipv6_ra_prefixes`` option. > >> > >> Fixes: 5c1d2d230773 ("northd: Add logical flows for dhcpv6 pfd parsing") > >> Signed-off-by: Frode Nordahl <fnord...@ubuntu.com> > >> --- > >> northd/northd.c | 7 ++++--- > >> 1 file changed, 4 insertions(+), 3 deletions(-) > >> > >> diff --git a/northd/northd.c b/northd/northd.c > >> index 1839b7d8b..7fdd722b5 100644 > >> --- a/northd/northd.c > >> +++ b/northd/northd.c > >> @@ -11378,10 +11378,11 @@ copy_ra_to_sb(struct ovn_port *op, const > >> char *address_mode) > >> ds_put_format(&s, "%s/%u ", addrs->network_s, addrs->plen); > >> } > >> - const char *ra_pd_list = smap_get(&op->sb->options, > >> "ipv6_ra_pd_list"); > >> - if (ra_pd_list) { > >> - ds_put_cstr(&s, ra_pd_list); > >> + for (int i = 0; i < op->nbrp->n_ipv6_prefix; i++) { > > I changed this to 'size_t i' and then pushed it to main and backported > down to 23.06.
Thanks alot for reviews, merges and backports, Dumitru and Mark. I'll make sure to use `size_t` as array iterators moving forward. -- Frode Nordahl > Thanks, Frode and Mark! > > Regards, > Dumitru > > >> + ds_put_cstr(&s, op->nbrp->ipv6_prefix[i]); > >> + ds_put_char(&s, ' '); > >> } > >> + > >> /* Remove trailing space */ > >> ds_chomp(&s, ' '); > >> smap_add(&options, "ipv6_ra_prefixes", ds_cstr(&s)); > > > > _______________________________________________ > > dev mailing list > > d...@openvswitch.org > > https://mail.openvswitch.org/mailman/listinfo/ovs-dev > > > _______________________________________________ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev