ip6_tunnel: better validate user provided tunnel names

commit db7a65e3ab upstream.

Use valid_name() to make sure user does not provide illegal
device name.

Fixes: 1da177e4c3 ("Linux-2.6.12-rc2")
Signed-off-by: Eric Dumazet <edumazet@google.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
[bwh: Backported to 3.16:
 - Don't touch err as ip6_tnl_create() does not return an error code
 - Adjust context]
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
This commit is contained in:
Eric Dumazet 2018-04-05 06:39:30 -07:00 • committed by Ben Hutchings
commit f8852307d3