Date: Sun, 3 Jul 2005 09:54:38 GMT From: LiangYi <liangyi571@hotmail.com> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/82919: Bridge configuration update will crash the system in 5.4 Message-ID: <200507030954.j639scs0019440@www.freebsd.org> Resent-Message-ID: <200507031000.j63A0Wh6038690@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 82919 >Category: kern >Synopsis: Bridge configuration update will crash the system in 5.4 >Confidential: no >Severity: critical >Priority: high >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sun Jul 03 10:00:32 GMT 2005 >Closed-Date: >Last-Modified: >Originator: LiangYi >Release: FreeBSD 5.4-RELEASE >Organization: lingzhou network Inc >Environment: FreeBSD bsd.lingzhou.com.cn 5.4-RELEASE FreeBSD 5.4-RELEASE #0 >Description: Setup a bridge like this sysctl -w net.link.ether.bridge_cfg="em0:1,em1:1" Generate some traffic on this bridge Update the bridge configuration like this sysctl -w net.link.ether.bridge_cfg="em1:1,em2:1" System will crash randomly. >How-To-Repeat: >Fix: --- bridge.c.orig Sun Jul 3 17:31:55 2005 +++ bridge.c Sun Jul 3 17:33:17 2005 @@ -767,13 +767,19 @@ struct ifnet *dst, *old; bdg_hash_table *bt; /* location in hash table */ int dropit = BDG_MUTED(ifp); + struct cluster_softc *clp; /* * hash the source address */ BDG_LOCK(); index = HASH_FN(eh->ether_shost); - bt = &BDG_CLUSTER(ifp)->ht[index]; + clp = BDG_CLUSTER(ifp); + if(clp==NULL) { + BDG_UNLOCK(); + return BDG_DROP; + } + bt = &clp->ht[index]; bt->used = 1; old = bt->name; if (old) { /* the entry is valid */ >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200507030954.j639scs0019440>