diff options
author | 2010-07-09 15:36:54 +0000 | |
---|---|---|
committer | 2010-07-09 15:36:54 +0000 | |
commit | 51deb95c51b343350affd42950002e88011d4be1 (patch) | |
tree | f03be3f0f6cc5436c116b648957a731f0510da7e | |
parent | instead of saying we're using the all the states in the table when (diff) | |
download | wireguard-openbsd-51deb95c51b343350affd42950002e88011d4be1.tar.xz wireguard-openbsd-51deb95c51b343350affd42950002e88011d4be1.zip |
When protocol filtering is used on the rtsocket filter only messages that
actually have a protocol/address family set. Messages like RTM_IFINFO or
RTM_IFANNOUNCE are family independent and should not be filtered but
it is possible to use a ROUTE_MSGFILTER to filter these messages.
This allows to reduce the messages sent to AF_INET or AF_INET6 only daemons.
OK henning@, deraadt@
-rw-r--r-- | sys/net/rtsock.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/sys/net/rtsock.c b/sys/net/rtsock.c index 0617ad5cf38..53088937a4e 100644 --- a/sys/net/rtsock.c +++ b/sys/net/rtsock.c @@ -1,4 +1,4 @@ -/* $OpenBSD: rtsock.c,v 1.102 2010/07/02 02:40:16 blambert Exp $ */ +/* $OpenBSD: rtsock.c,v 1.103 2010/07/09 15:36:54 claudio Exp $ */ /* $NetBSD: rtsock.c,v 1.18 1996/03/29 00:32:10 cgd Exp $ */ /* @@ -262,6 +262,7 @@ route_input(struct mbuf *m0, ...) if (rp->rcb_proto.sp_family != proto->sp_family) continue; if (rp->rcb_proto.sp_protocol && + proto->sp_protocol && rp->rcb_proto.sp_protocol != proto->sp_protocol) continue; /* |