summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClaudio Jeker <claudio@cvs.openbsd.org>2008-06-08 20:27:24 +0000
committerClaudio Jeker <claudio@cvs.openbsd.org>2008-06-08 20:27:24 +0000
commit9ee5f2d583bba06485746e3e6dcff56faab2df19 (patch)
tree188e634dfb60c0dba0f7e9f32bf25cd4e19a1e69
parent49b5c95286bc4e3a7b814ff0103fe63f5e3c8a5c (diff)
The default route is 0.0.0.0/0 so it is necessary to check the mask as well.
OK henning@
-rw-r--r--sys/net/if.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 37638c8bcb8..fb6271fac97 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.171 2008/05/23 15:51:12 thib Exp $ */
+/* $OpenBSD: if.c,v 1.172 2008/06/08 20:27:23 claudio Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1865,7 +1865,8 @@ if_group_routechange(struct sockaddr *dst, struct sockaddr *mask)
{
switch (dst->sa_family) {
case AF_INET:
- if (satosin(dst)->sin_addr.s_addr == INADDR_ANY)
+ if (satosin(dst)->sin_addr.s_addr == INADDR_ANY &&
+ satosin(mask)->sin_addr.s_addr == INADDR_ANY)
if_group_egress_build();
break;
#ifdef INET6