From 5deab1ebec7d35c921ed24dbe27ead3c6f5956c7 Mon Sep 17 00:00:00 2001 From: Sebastian Benoit Date: Thu, 5 Jul 2018 11:59:27 +0000 Subject: not all route messages have a priority. Move the priority filter check where it belongs. Problem spotted by by remi@ ok sthen@ claudio@ krw@ --- sys/net/rtsock.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'sys') diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index afab5d72505..0046059336b 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.273 2018/07/01 08:53:03 mpi Exp $ */ +/* $OpenBSD: rtsock.c,v 1.274 2018/07/05 11:59:26 benno Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -465,9 +465,6 @@ next: if (rtm->rtm_type != RTM_DESYNC && rop->rop_msgfilter != 0 && !(rop->rop_msgfilter & (1 << rtm->rtm_type))) goto next; - if (rop->rop_priority != 0 && - rop->rop_priority < rtm->rtm_priority) - goto next; switch (rtm->rtm_type) { case RTM_IFANNOUNCE: case RTM_DESYNC: @@ -483,6 +480,9 @@ next: goto next; break; default: + if (rop->rop_priority != 0 && + rop->rop_priority < rtm->rtm_priority) + goto next; /* check against rtable id */ if (rop->rop_rtableid != RTABLE_ANY && rop->rop_rtableid != rtm->rtm_tableid) -- cgit v1.2.3