diff options
| author | 2008-12-12 21:52:04 +0000 | |
|---|---|---|
| committer | 2008-12-12 21:52:04 +0000 | |
| commit | 4fb10ec395824e6a0b8bc16c8311232c8cf2dd29 (patch) | |
| tree | c6af43b32be775fd46e33436fa371b37ba09915b /sys/net/rtsock.c | |
| parent | fix a bug that slipped through my last commit. (diff) | |
| download | wireguard-openbsd-4fb10ec395824e6a0b8bc16c8311232c8cf2dd29.tar.xz wireguard-openbsd-4fb10ec395824e6a0b8bc16c8311232c8cf2dd29.zip | |
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.c | 5 |
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; |
