From: Phil Sutter Date: Fri, 13 Nov 2015 17:08:57 +0000 (+0100) Subject: iptunnel: use ll_name_to_index() for physical interface lookup X-Git-Tag: v4.4.0~60 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4b3cb96281ebf39fa63734c7879fbf078d1bfa7b;p=thirdparty%2Fiproute2.git 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 --- diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 803bb8328..a5478529a 100644 --- a/ip/iptunnel.c +++ b/ip/iptunnel.c @@ -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;