On Mon, May 15, 2017 at 08:43:02PM +0200, Florian Riehm wrote: > > The attached patch ports the multipath support from ospfd to ospf6d.
> @@ -171,48 +260,30 @@ kr_change(struct kroute *kroute) > * - zero out ifindex (this is no longer relevant) > */ > action = RTM_CHANGE; > - kr->r.flags = kroute->flags | F_OSPFD_INSERTED; > - kr->r.ifindex = 0; > - rtlabel_unref(kr->r.rtlabel); > - kr->r.ext_tag = kroute->ext_tag; > - kr->r.rtlabel = kroute->rtlabel; > - } > + } else if (kr->next == NULL) /* single path OSPF route */ > + action = RTM_CHANGE; I wonder wether this check should be } else if (kr->next == NULL && krcount == 1) At least this is what ospfd is doing. > RB_FOREACH(kr, kroute_tree, &krt) > if (!(kr->r.flags & F_KERNEL)) > - send_rtmsg(kr_state.fd, RTM_ADD, &kr->r); > + for (kn = kr; kn != NULL; kn = kn->next) { > + send_rtmsg(kr_state.fd, RTM_ADD, &kn->r); > + } > - RB_FOREACH(kr, kroute_tree, &krt) > + RB_FOREACH(kr, kroute_tree, &krt) { > if (!(kr->r.flags & F_KERNEL)) > - send_rtmsg(kr_state.fd, RTM_DELETE, &kr->r); > + for (kn = kr; kn != NULL; kn = kn->next) { > + send_rtmsg(kr_state.fd, RTM_DELETE, &kn->r); > + } > + } The braces { } are used a bit inconsistently here. Anyway I think this diff should go in as it is. OK bluhm@