Commit 4b3cb962 authored by Phil Sutter's avatar Phil Sutter Committed by Stephen Hemminger

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: default avatarPhil Sutter <phil@nwl.cc>
parent 6ddb1e8c
......@@ -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;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment