summaryrefslogtreecommitdiff
path: root/sys/net/rtsock.c
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2010-07-09 15:36:55 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2010-07-09 15:36:55 +0000
commit98dcd9ce95746875716d2dc275ed360da03ae7ff (patch)
treef44db0f0f357cbbeee43eefd1767897d82acdeac /sys/net/rtsock.c
parent2c98b17abafb07d8dc546abab697641a2c563df3 (diff)
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@
Diffstat (limited to 'sys/net/rtsock.c')
-rw-r--r--sys/net/rtsock.c3
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;
/*