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
This commit is contained in:
parent
166d99c35c
commit
b6bb334af4
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user