Notice while hacking in OpenBGPD. Unlike routing socket messages the messages from the sysctl interface have RTF_DONE not set. I think it would make sense to set RTF_DONE also in this case since it makes reusing code easier.
All messages sent out via sysctl_dumpentry() have been processed by the kernel so setting RTF_DONE kind of makes sense. Any comments? -- :wq Claudio Index: rtsock.c =================================================================== RCS file: /cvs/src/sys/net/rtsock.c,v retrieving revision 1.328 diff -u -p -r1.328 rtsock.c --- rtsock.c 6 Jun 2022 14:45:41 -0000 1.328 +++ rtsock.c 8 Jun 2022 14:10:20 -0000 @@ -1987,7 +1987,7 @@ sysctl_dumpentry(struct rtentry *rt, voi struct rt_msghdr *rtm = (struct rt_msghdr *)w->w_tmem; rtm->rtm_pid = curproc->p_p->ps_pid; - rtm->rtm_flags = rt->rt_flags; + rtm->rtm_flags = RTF_DONE | rt->rt_flags; rtm->rtm_priority = rt->rt_priority & RTP_MASK; rtm_getmetrics(&rt->rt_rmx, &rtm->rtm_rmx); /* Do not account the routing table's reference. */