diff options
author | bms <bms@FreeBSD.org> | 2004-07-04 15:53:28 +0000 |
---|---|---|
committer | bms <bms@FreeBSD.org> | 2004-07-04 15:53:28 +0000 |
commit | b6bb334af424373538c48137c60a03a2a221ac4d (patch) | |
tree | 53b629102757b85925842de2a9707bd98a5e35a7 /sys | |
parent | 166d99c35ccf9934f3c0f2a23bef6481b2719c14 (diff) | |
download | FreeBSD-src-b6bb334af424373538c48137c60a03a2a221ac4d.zip FreeBSD-src-b6bb334af424373538c48137c60a03a2a221ac4d.tar.gz |
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
Diffstat (limited to 'sys')
-rw-r--r-- | sys/net/bridge.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/sys/net/bridge.c b/sys/net/bridge.c index b6583a9..0bbdf77 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; |