From 4c9e94d42c70f2eca1952ec8dcb3da772907c240 Mon Sep 17 00:00:00 2001 From: Bruce M Simpson Date: Sun, 4 Jul 2004 15:53:28 +0000 Subject: [PATCH] The net.link.ether.bridge.enable sysctl MIB variable enables bridge functionality by setting to a non-zero value. This is an integer, but is treated as a boolean by the code, so clamp it to a boolean value when set so as to avoid unnecessary bridge reinitialization if it's changed to another value. PR: kern/61174 Requested by: Bruce Cran --- sys/net/bridge.c | 1 + 1 file changed, 1 insertion(+) diff --git a/sys/net/bridge.c b/sys/net/bridge.c index b6583a92e9af..0bbdf77ac0bc 100644 --- a/sys/net/bridge.c +++ b/sys/net/bridge.c @@ -565,6 +565,7 @@ sysctl_bdg(SYSCTL_HANDLER_ARGS) int error; error = sysctl_handle_int(oidp, &enable, 0, req); + enable = (enable) ? 1 : 0; BDG_LOCK(); if (enable != do_bridge) { do_bridge = enable;