summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-12-12 21:52:05 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-12-12 21:52:05 +0000
commit5b78a9b707a28bbac3b9990a915717f59df94926 (patch)
tree28f0fb024d9007cc848f8e8a10e0889124e15efd /sys/net/rtsock.c
parent37f73018e241ca6f68d4e1d286034d39bd400a60 (diff)
Make sure that incomming routing messages don't have RTP_DOWN set. Mask
the rtm_priority with RTP_MASK so that userland (e.g. arp) can issue a RTM_GET and reissue the message as RTM_DELETE.
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c
index f956eda8737..66328b883ca 100644
--- a/sys/net/rtsock.c
+++ b/sys/net/rtsock.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: rtsock.c,v 1.78 2008/11/22 22:34:11 claudio Exp $ */
+/* $OpenBSD: rtsock.c,v 1.79 2008/12/12 21:52:04 claudio Exp $ */
/* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */
/*
@@ -255,6 +255,9 @@ route_output(struct mbuf *m, ...)
}
}
+ /* make sure that kernel only bits are not set */
+ rtm->rtm_priority &= RTP_MASK;
+
if (rtm->rtm_priority != 0) {
if (rtm->rtm_priority > RTP_MAX) {
error = EINVAL;