kern/82919: Bridge configuration update will crash the system in 5.4
LiangYi
liangyi571 at hotmail.com
Sun Jul 3 10:00:33 GMT 2005
>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:
More information about the freebsd-bugs
mailing list