Date: Fri, 16 Jun 2000 20:04:42 -0400 From: "Vladimir N. Silyaev" <vsilyaev@mindspring.com> To: emulation@freebsd.org Subject: FlwUp: New vmware port: testers required Message-ID: <20000616200442.A289@jupiter.delta.ny.us> In-Reply-To: <200006161629.e5GGTaa28972@dmz.visiontech-dml.com>; from vsilyaev@mindspring.com on Fri, Jun 16, 2000 at 07:29:36PM %2B0300 References: <200006161629.e5GGTaa28972@dmz.visiontech-dml.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Hi, To be able to test new vmnet module it's also required to apply the following patch and after file rc.d/vmware.sh was started, to run the next command: sysctl -w net.link.ether.bridge_refresh=1 -- With best regards, Vladimir --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="bridge.diff" --- src/sys/net/bridge.c.orig Fri Jun 9 06:48:39 2000 +++ src/sys/net/bridge.c Fri Jun 16 19:53:56 2000 @@ -118,6 +118,7 @@ #define DEB(x) static void bdginit(void *); +static void bdgtakeifaces(void); static void flush_table(void); static void bdg_promisc_on(void); static void parse_bdg_cfg(void); @@ -321,6 +322,16 @@ return error ; } +static int +sysctl_refresh SYSCTL_HANDLER_ARGS +{ + if (req->newptr) + bdgtakeifaces(); + + return 0; +} + + SYSCTL_DECL(_net_link_ether); SYSCTL_PROC(_net_link_ether, OID_AUTO, bridge_cfg, CTLTYPE_STRING|CTLFLAG_RW, &bridge_cfg, sizeof(bridge_cfg), &sysctl_bdg_cfg, "A", @@ -340,6 +351,9 @@ SYSCTL_INT(_net_link_ether, OID_AUTO, bridge_ipfw_collisions, CTLFLAG_RW, &bdg_ipfw_colls,0,""); +SYSCTL_PROC(_net_link_ether, OID_AUTO, bridge_refresh, CTLTYPE_INT|CTLFLAG_WR, + NULL, 0, &sysctl_refresh, "I", "iface refresh"); + #if 1 /* diagnostic vars */ int bdg_in_count = 0 , bdg_in_ticks = 0 , bdg_fw_count = 0, bdg_fw_ticks = 0 ; SYSCTL_INT(_net_link_ether, OID_AUTO, bdginc, CTLFLAG_RW, &bdg_in_count,0,""); @@ -419,11 +433,6 @@ static void bdginit(void *dummy) { - int i ; - struct ifnet *ifp; - struct arpcom *ac ; - u_char *eth_addr ; - struct bdg_softc *bp; if (bdg_table == NULL) bdg_table = (struct hash_table *) @@ -436,8 +445,23 @@ bzero(ifp2sc, BDG_MAX_PORTS * sizeof(struct bdg_softc) ); bzero(&bdg_stats, sizeof(bdg_stats) ); + bdgtakeifaces(); + bdg_timeout(0); + do_bridge=0; +} + +void +bdgtakeifaces(void) +{ + int i ; + struct ifnet *ifp; + struct arpcom *ac ; + u_char *eth_addr ; + struct bdg_softc *bp; + bdg_ports = 0 ; eth_addr = bdg_addresses ; + *bridge_cfg = '\0'; printf("BRIDGE 990810, have %d interfaces\n", if_index); for (i = 0 , ifp = ifnet.tqh_first ; i < if_index ; @@ -466,8 +490,6 @@ bdg_ports ++ ; } - bdg_timeout(0); - do_bridge=0; } /* --fdj2RfSjLxBAspz7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-emulation" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20000616200442.A289>