summaryrefslogtreecommitdiffstats
path: root/sys/net/if.c
diff options
context:
space:
mode:
authormpi <mpi@openbsd.org>2019-05-11 23:36:40 +0000
committermpi <mpi@openbsd.org>2019-05-11 23:36:40 +0000
commit4251ecd9b62e5eef0e16e14a09085ea0be91052e (patch)
treeff003e82d37963bcedca280e734b371eeededf74 /sys/net/if.c
parentShow driver name on net80211 scan debug lines. (diff)
downloadwireguard-openbsd-4251ecd9b62e5eef0e16e14a09085ea0be91052e.tar.xz
wireguard-openbsd-4251ecd9b62e5eef0e16e14a09085ea0be91052e.zip
Correct a check in if_isconnected().
Fix a regression introduced by the bridge(4) refactoring. Found by and ok bluhm@
Diffstat (limited to 'sys/net/if.c')
-rw-r--r--sys/net/if.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sys/net/if.c b/sys/net/if.c
index 8b7d7075cdf..04ac3e9a862 100644
--- a/sys/net/if.c
+++ b/sys/net/if.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: if.c,v 1.581 2019/04/28 22:15:57 mpi Exp $ */
+/* $OpenBSD: if.c,v 1.582 2019/05/11 23:36:40 mpi Exp $ */
/* $NetBSD: if.c,v 1.35 1996/05/07 05:26:04 thorpej Exp $ */
/*
@@ -1192,7 +1192,7 @@ if_isconnected(const struct ifnet *ifp0, unsigned int ifidx)
connected = 1;
#if NBRIDGE > 0
- if (ifp0->if_bridgeidx == ifp->if_bridgeidx)
+ if (ifp0->if_bridgeidx != 0 && ifp0->if_bridgeidx == ifp->if_bridgeidx)
connected = 1;
#endif
#if NCARP > 0