From 79e482af1743240c5f8a3d892541f06e80730e9d Mon Sep 17 00:00:00 2001 From: jason Date: Mon, 10 Apr 2000 13:34:54 +0000 Subject: [PATCH] don't return directly from bridge_ioctl without splx() on invalid enc interfaces; modified version of patch from Armin Wolfermann . --- sys/net/if_bridge.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/sys/net/if_bridge.c b/sys/net/if_bridge.c index 4879cf27a8d..0bc9a86973e 100644 --- a/sys/net/if_bridge.c +++ b/sys/net/if_bridge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: if_bridge.c,v 1.28 2000/02/28 23:41:28 jason Exp $ */ +/* $OpenBSD: if_bridge.c,v 1.29 2000/04/10 13:34:54 jason Exp $ */ /* * Copyright (c) 1999, 2000 Jason L. Wright (jason@thought.net) @@ -302,13 +302,15 @@ bridge_ioctl(ifp, cmd, data) break; } } - else if (ifs->if_type == IFT_ENC) { #if NENC > 0 + else if (ifs->if_type == IFT_ENC) { /* Can't bind enc0 to a bridge */ - if (ifs->if_softc == &encif[0]) - return EINVAL; -#endif /* NENC */ + if (ifs->if_softc == &encif[0]) { + error = EINVAL; + break; + } } +#endif /* NENC */ else { error = EINVAL; break; -- 2.20.1