From: claudio Date: Thu, 16 Jun 2022 10:35:45 +0000 (+0000) Subject: Mark routes sent via sysctl(2) with RTF_DONE like it is done on the X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=6d2c17e2e375a2fc184d25c82f6d916ad88c19cd;p=openbsd Mark routes sent via sysctl(2) with RTF_DONE like it is done on the route socket. All messages passed are by definition done. This may allow to share more code between sysctl and route socket parsers. OK mpi@ --- diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index bb2c1224593..741d660fd23 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.328 2022/06/06 14:45:41 claudio Exp $ */ +/* $OpenBSD: rtsock.c,v 1.329 2022/06/16 10:35:45 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -1987,7 +1987,7 @@ sysctl_dumpentry(struct rtentry *rt, void *v, unsigned int id) 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. */