diff options
author | Sebastian Benoit <benno@cvs.openbsd.org> | 2018-07-05 11:59:27 +0000 |
---|---|---|
committer | Sebastian Benoit <benno@cvs.openbsd.org> | 2018-07-05 11:59:27 +0000 |
commit | 5deab1ebec7d35c921ed24dbe27ead3c6f5956c7 (patch) | |
tree | 6bf8bca676326465fc95e75580d2fe016a3ad97e /sys | |
parent | 7c78dd1f59f9bbaba26804fb92a237c1b42a0867 (diff) |
not all route messages have a priority. Move the priority filter check
where it belongs. Problem spotted by by remi@
ok sthen@ claudio@ krw@
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/rtsock.c | 8 |
1 files changed, 4 insertions, 4 deletions
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) |