Dear Sir.
I want to rename "eth0.0.10" to "LAN0" in kernel space.
"eth0.0.10" is vlan interface.
It is possible use the net/core/dev.c::dev_change_name()
Code:
struct net_device *dev = dev_get_byname(&init_net, "eth0.0.10");
dev_change_name(dev, "LAN0");
can rename "eth0.0.10" to "LAN0",
But occured the some Warning message. see below
Code:
[ 57.702917] RTNL: assertion failed at net/ipv4/devinet.c (1218)
[ 57.702923] Pid: 1694, comm: insmod Not tainted 3.4.74-nexg #41
[ 57.702928] Call Trace:
[ 57.702936] [<ffffffff815fb53d>] ? inetdev_event+0x4bd/0x4f0
[ 57.702945] [<ffffffff818affdd>] ? dump_stack+0x69/0x6f
[ 57.702954] [<ffffffff8104ef26>] ? notifier_call_chain+0x46/0x70
[ 57.702962] [<ffffffff8155e239>] ? dev_change_name+0x189/0x1f0
[ 57.702983] [<ffffffffa00521e4>] ? rtl8367_init+0x1e4/0x2dd [nexg_driver_rtl836x_837x]
[ 57.702991] [<ffffffffa0052000>] ? 0xffffffffa0051fff
[ 57.702999] [<ffffffff810001c9>] ? do_one_initcall+0x39/0x170
[ 57.703007] [<ffffffff8106d5c0>] ? sys_init_module+0x90/0x1e0
[ 57.703016] [<ffffffff818b3362>] ? system_call_fastpath+0x16/0x1b
Are you have a another way to rename ethernet interface name???
Thank you.