mirror_iproute2/bridge
Serhey Popovych 7a14358b16 iplink: Use ll_name_to_index() instead of if_nametoindex()
While benefit from using ll_name_to_index() with populated
cache can potentially be exploited only in few places
(e.g. bridge fdb/mdb/vlan show routines) there is another
advantage of ll_name_to_index() over plain if_nametoindex():

  in case of if_nametoindex() failure ll_name_to_index()
  will attempt to get index from common name in form "if%d"
  that may be returned from ll_index_to_name().

This makes output from ip(8) coherent with it's input.

Note that most of the code already switched from plain
if_nametoindex() to ll_name_to_index() to cached variant.

Signed-off-by: Serhey Popovych <serhe.popovych@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2018-01-23 14:50:59 -08:00
..
.gitignore Add bridge command 2012-08-01 15:23:49 -07:00
br_common.h SPDX license identifiers 2017-11-24 12:21:35 -08:00
bridge.c SPDX license identifiers 2017-11-24 12:21:35 -08:00
fdb.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00
link.c iplink: Use ll_index_to_name() instead of if_indextoname() 2018-01-18 16:34:37 -08:00
Makefile SPDX license identifiers 2017-11-24 12:21:35 -08:00
mdb.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00
monitor.c scrub out whitespace issues 2016-03-27 10:50:14 -07:00
vlan.c iplink: Use ll_name_to_index() instead of if_nametoindex() 2018-01-23 14:50:59 -08:00