iptunnel: use ll_name_to_index() for physical interface lookup

Although the cache is only initialized in do_show(), this way it is at
least consistent with ip6tunnel.

Signed-off-by: Phil Sutter <phil@nwl.cc>
This commit is contained in:
Phil Sutter 2015-11-13 18:08:57 +01:00 committed by Stephen Hemminger
parent 6ddb1e8c90
commit 4b3cb96281
1 changed files with 1 additions and 1 deletions

View File

@ -226,7 +226,7 @@ static int parse_args(int argc, char **argv, int cmd, struct ip_tunnel_parm *p)
}
if (medium[0]) {
p->link = if_nametoindex(medium);
p->link = ll_name_to_index(medium);
if (p->link == 0) {
fprintf(stderr, "Cannot find device \"%s\"\n", medium);
return -1;