[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: brconfig timeout panic
- To: misc_(_at_)_openbsd_(_dot_)_org
- Subject: Re: brconfig timeout panic
- From: Henning Brauer <lists-openbsd_(_at_)_bsws_(_dot_)_de>
- Date: Fri, 30 May 2003 00:31:59 +0159
- Mail-followup-to: misc_(_at_)_openbsd_(_dot_)_org
On Thu, May 29, 2003 at 03:51:26PM +0300, Artis Caune wrote:
> huh!
>
> 'brconfig bridge0 timeout -1'
> and box crashes!
> :(
>
> #OpenBSD 3.3 stable
can you try this?
Index: if_bridge.c
===================================================================
RCS file: /cvs/src/sys/net/if_bridge.c,v
retrieving revision 1.115
diff -u -r1.115 if_bridge.c
--- if_bridge.c 3 May 2003 21:15:11 -0000 1.115
+++ if_bridge.c 29 May 2003 22:28:24 -0000
@@ -548,6 +548,10 @@
case SIOCBRDGSTO:
if ((error = suser(prc->p_ucred, &prc->p_acflag)) != 0)
break;
+ if (bparam->ifbrp_ctime < 0) {
+ error = EINVAL;
+ break;
+ }
sc->sc_brttimeout = bparam->ifbrp_ctime;
timeout_del(&sc->sc_brtimeout);
if (bparam->ifbrp_ctime != 0)
Index: if_bridge.h
===================================================================
RCS file: /cvs/src/sys/net/if_bridge.h,v
retrieving revision 1.20
diff -u -r1.20 if_bridge.h
--- if_bridge.h 9 Dec 2002 10:11:52 -0000 1.20
+++ if_bridge.h 29 May 2003 22:28:34 -0000
@@ -113,7 +113,7 @@
char ifbrp_name[IFNAMSIZ];
union {
u_int32_t ifbrpu_csize; /* cache size */
- u_int32_t ifbrpu_ctime; /* cache time (sec) */
+ int ifbrpu_ctime; /* cache time (sec) */
u_int16_t ifbrpu_prio; /* bridge priority */
u_int8_t ifbrpu_hellotime; /* hello time (sec) */
u_int8_t ifbrpu_fwddelay; /* fwd delay (sec) */
--
http://2suck.net/hhwl.html - http://www.bsws.de/
Unix is very simple, but it takes a genius to understand the simplicity.
(Dennis Ritchie)
Visit your host, monkey.org