diff options
author | mpi <mpi@openbsd.org> | 2019-05-11 23:36:40 +0000 |
---|---|---|
committer | mpi <mpi@openbsd.org> | 2019-05-11 23:36:40 +0000 |
commit | 4251ecd9b62e5eef0e16e14a09085ea0be91052e (patch) | |
tree | ff003e82d37963bcedca280e734b371eeededf74 /sys/net/if.c | |
parent | Show driver name on net80211 scan debug lines. (diff) | |
download | wireguard-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.c | 4 |
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 |