From patchwork Fri Nov 13 17:08:57 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Sutter X-Patchwork-Id: 544391 X-Patchwork-Delegate: shemminger@vyatta.com Return-Path: X-Original-To: patchwork-incoming@ozlabs.org Delivered-To: patchwork-incoming@ozlabs.org Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by ozlabs.org (Postfix) with ESMTP id 08B6F141423 for ; Sat, 14 Nov 2015 04:10:27 +1100 (AEDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932903AbbKMRKU (ORCPT ); Fri, 13 Nov 2015 12:10:20 -0500 Received: from orbit.nwl.cc ([176.31.251.142]:40702 "EHLO mail.nwl.cc" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933381AbbKMRJK (ORCPT ); Fri, 13 Nov 2015 12:09:10 -0500 Received: from mail.nwl.cc (orbit [127.0.0.1]) by mail.nwl.cc (Postfix) with ESMTP id 600CE2152C; Fri, 13 Nov 2015 18:09:06 +0100 (CET) Received: by mail.nwl.cc (Postfix, from userid 1000) id 1EE5E21518; Fri, 13 Nov 2015 18:09:06 +0100 (CET) From: Phil Sutter To: Stephen Hemminger Cc: netdev@vger.kernel.org Subject: [iproute PATCH 04/12] iptunnel: use ll_name_to_index() for physical interface lookup Date: Fri, 13 Nov 2015 18:08:57 +0100 Message-Id: <1447434545-32182-5-git-send-email-phil@nwl.cc> X-Mailer: git-send-email 2.1.2 In-Reply-To: <1447434545-32182-1-git-send-email-phil@nwl.cc> References: <1447434545-32182-1-git-send-email-phil@nwl.cc> X-Virus-Scanned: ClamAV using ClamSMTP Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org Although the cache is only initialized in do_show(), this way it is at least consistent with ip6tunnel. Signed-off-by: Phil Sutter --- ip/iptunnel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ip/iptunnel.c b/ip/iptunnel.c index 803bb83..a547852 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;