drivers/net: Register "/dev/net/tun" as tun node too

to compatible with Linux convention

Signed-off-by: Xiang Xiao <xiaoxiang@xiaomi.com>
This commit is contained in:
Xiang Xiao 2024-10-06 13:28:39 +08:00 committed by GUIDINGLI
parent 77821fb7eb
commit 4e5a963443

View file

@ -1313,6 +1313,7 @@ int tun_initialize(void)
{
g_tun.free_tuns = (1 << CONFIG_TUN_NINTERFACES) - 1;
register_driver("/dev/tun", &g_tun_file_ops, 0644, &g_tun);
register_driver("/dev/net/tun", &g_tun_file_ops, 0644, &g_tun);
return OK;
}