diff options
-rw-r--r-- | sys/net/if_bridge.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 44f0d9cc3c1..882eb9c3283 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.334 2019/06/09 17:40:34 mpi Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.335 2019/06/09 17:42:16 mpi Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -361,7 +361,10 @@ bridge_ioctl(struct ifnet *ifp, u_long cmd, caddr_t data) break; } if (ifs->if_bridgeidx != 0) { - error = EBUSY; + if (ifs->if_bridgeidx == ifp->if_index) + error = EEXIST; + else + error = EBUSY; break; } SMR_SLIST_FOREACH_LOCKED(bif, &sc->sc_spanlist, bif_next) { |