Page MenuHomeFreeBSD

D24432.id70617.diff
No OneTemporary

D24432.id70617.diff

Index: sys/net/if_bridge.c
===================================================================
--- sys/net/if_bridge.c
+++ sys/net/if_bridge.c
@@ -690,7 +690,7 @@
{
struct bridge_softc *sc, *sc2;
struct ifnet *bifp, *ifp;
- int fb, retry;
+ int retry;
unsigned long hostid;
sc = malloc(sizeof(*sc), M_DEVBUF, M_WAITOK|M_ZERO);
@@ -722,28 +722,16 @@
ifp->if_type = IFT_BRIDGE;
/*
- * Generate an ethernet address with a locally administered address.
+ * Generate an ethernet address.
*
* Since we are using random ethernet addresses for the bridge, it is
* possible that we might have address collisions, so make sure that
* this hardware address isn't already in use on another bridge.
- * The first try uses the hostid and falls back to arc4rand().
*/
- fb = 0;
getcredhostid(curthread->td_ucred, &hostid);
do {
- if (fb || hostid == 0) {
- ether_gen_addr(ifp, &sc->sc_defaddr);
- } else {
- sc->sc_defaddr.octet[0] = 0x2;
- sc->sc_defaddr.octet[1] = (hostid >> 24) & 0xff;
- sc->sc_defaddr.octet[2] = (hostid >> 16) & 0xff;
- sc->sc_defaddr.octet[3] = (hostid >> 8 ) & 0xff;
- sc->sc_defaddr.octet[4] = hostid & 0xff;
- sc->sc_defaddr.octet[5] = ifp->if_dunit & 0xff;
- }
+ ether_gen_addr(ifp, &sc->sc_defaddr);
- fb = 1;
retry = 0;
BRIDGE_LIST_LOCK();
LIST_FOREACH(sc2, &V_bridge_list, sc_list) {

File Metadata

Mime Type
text/plain
Expires
Thu, Mar 19, 11:56 PM (11 h, 11 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
29986232
Default Alt Text
D24432.id70617.diff (1 KB)

Event Timeline