]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
iptunnel: use ll_name_to_index() for physical interface lookup
authorPhil Sutter <phil@nwl.cc>
Fri, 13 Nov 2015 17:08:57 +0000 (18:08 +0100)
committerStephen Hemminger <shemming@brocade.com>
Mon, 23 Nov 2015 23:26:37 +0000 (15:26 -0800)
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>
ip/iptunnel.c

index 803bb8328dffe2999a630eee06ba94ebdb1f01f2..a5478529a2f48e709bd6ad23232135c6688d0120 100644 (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;