Message-ID: <40E54007.9030206@...231...> From: sam MIME-Version: 1.0 References: <67CF4F1A72E8B470C95AE917@[192.168.1.22]> <40E51857.3020400@...231...> In-Reply-To: <40E51857.3020400@...231...> Subject: [Openvpn-devel] Re: [Openvpn-users] Urgent: Limitation to 100 virtual tunnel devices?? Sender: openvpn-devel-admin@lists.sourceforge.net Errors-To: openvpn-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Id: List-Post: List-Help: List-Subscribe: , List-Archive: Date: Thu Jul 8 09:49:15 2004 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Cc: Juerg.VonBueren@...245..., openvpn-devel@lists.sourceforge.net sam wrote: > Is this only specific to Linux? > how about others using BSD systems? > sam > > Claas Hilbrecht wrote: > I just looked at the code in FreeBSD 5 CURRENT, it handles 1000 tunnel by default: case MOD_LOAD: /* intitialize device */ mtx_init(&tapmtx, "tapmtx", NULL, MTX_DEF); SLIST_INIT(&taphead); clone_setup(&tapclones); eh_tag = EVENTHANDLER_REGISTER(dev_clone, tapclone, 0, 1000); if (eh_tag == NULL) { clone_cleanup(&tapclones); mtx_destroy(&tapmtx); return (ENOMEM); } return (0); Sit back and relax. :) sam >> --Am Donnerstag, 1. Juli 2004 17:18 +0100 Juerg.VonBueren@...245... >> schrieb: >> >>> We are running into trouble with more than 100 virtual tunnel devices . >>> The reported problem is as follows: >>> Jul 1 06:30:19 1100PRVC001 openvpn[15520]: Note: Cannot ioctl >>> TUNSETIFF >> >> >> >> I assume you need the following patch: >> >> diff -urN linux-2.4.26.org/net/core/dev.c linux-2.4.26/net/core/dev.c >> --- linux-2.4.26.org/net/core/dev.c Wed Apr 14 15:05:41 2004 >> +++ linux-2.4.26/net/core/dev.c Thu Apr 15 18:54:01 2004 >> @@ -619,8 +619,12 @@ >> >> /* >> * If you need over 100 please also fix the algorithm... >> + * >> + * Maybe it's never needed but just to be sure we allow >> + * up to 1000 tun/tap devices. >> + * >> */ >> - for (i = 0; i < 100; i++) { >> + for (i = 0; i < 1000; i++) { >> snprintf(buf,sizeof(buf),name,i); >> if (__dev_get_by_name(buf) == NULL) { >> strcpy(dev->name, buf); >> >> > >