-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Thursday 01 July 2004 18:18, juerg.vonbue...@amag.ch wrote:

> Is there any known Limitation to 100 TUN-Devices or how can we break that
> limitation?

This is a limitation in the Linux kernel code not in OpenVPN.

The limitation is in net/core/dev.c

You can change this by modifying the value and kernel recompile.

See in net/core/dev.c:

- --------------

        /*
         * If you need over 100 please also fix the algorithm...
         */
        for (i = 0; i < 100; i++) {
                snprintf(buf,sizeof(buf),name,i);
                if (__dev_get_by_name(buf) == NULL) {
                        strcpy(dev->name, buf);
                        return i;
                }
        }
        return -ENFILE; /* Over 100 of the things .. bail out! */
}

- --------------

Note that performance will be bad when going beyond about 200 or 300 devices 
on a modern pc.

It is better to replace the code by a hashed device lookup. I found out that 
this is the case in my debian 2.6. kernel. I haven't checked when this was 
introduced and whether this is a debian patch or present in the vanilla 
kernel code.

I can send you a patch by mail for the 2.4.26 kernel which also should apply 
back to 2.4.18 or lower. This was written by Ben Greer for VLAN support and I 
modified it to apply cleanly to 2.4.18 and higher. Linus rejected this patch 
for the 2.4 series. It works for me on more than 30 servers without any 
problems.

A linux distro including this patch is Adamantix (www.adamantix.org)

Torge
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (GNU/Linux)

iD8DBQFA5EPSosmtDiD9dbIRAt/uAJ9gI/O6SQX4+XLmJcPtut/KNQEoewCaAlJt
UR6wuo9p1IFCUakA1coyLA4=
=eOGl
-----END PGP SIGNATURE-----

Reply via email to