]> git.baikalelectronics.ru Git - kernel.git/commit
[INET]: Don't create tunnels with '%' in name.
authorPavel Emelyanov <xemul@openvz.org>
Wed, 27 Feb 2008 07:51:04 +0000 (23:51 -0800)
committerDavid S. Miller <davem@davemloft.net>
Wed, 27 Feb 2008 07:51:04 +0000 (23:51 -0800)
commite51b394dc032ea1c53a9e747fc6e0c1061b9f71a
treedfa41745c88edb80a47c246d13a899ee06a7510f
parent279a835b9bd6364cb8c310d22c839c34d2026dd0
[INET]: Don't create tunnels with '%' in name.

Four tunnel drivers (ip_gre, ipip, ip6_tunnel and sit) can receive a
pre-defined name for a device from the userspace.  Since these drivers
call the register_netdevice() (rtnl_lock, is held), which does _not_
generate the device's name, this name may contain a '%' character.

Not sure how bad is this to have a device with a '%' in its name, but
all the other places either use the register_netdev(), which call the
dev_alloc_name(), or explicitly call the dev_alloc_name() before
registering, i.e. do not allow for such names.

This had to be prior to the commit 34cc7b, but I forgot to number the
patches and this one got lost, sorry.

Signed-off-by: Pavel Emelyanov <xemul@openvz.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/ipv4/ip_gre.c
net/ipv4/ipip.c
net/ipv6/ip6_tunnel.c
net/ipv6/sit.c