summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorclaudio <claudio@openbsd.org>2008-06-08 20:27:23 +0000
committerclaudio <claudio@openbsd.org>2008-06-08 20:27:23 +0000
commite9a6127050402c0cb7ada8ee4eb84d339b9f8960 (patch)
tree52fbff7b3b76a46ad57ed1cb0e119158cf6e7f27
parentHave the sftp client store the statvfs replies in wire format, (diff)
downloadwireguard-openbsd-e9a6127050402c0cb7ada8ee4eb84d339b9f8960.tar.xz
wireguard-openbsd-e9a6127050402c0cb7ada8ee4eb84d339b9f8960.zip
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