]> git.baikalelectronics.ru Git - kernel.git/commit
tipc: simplify the link lookup routine
authorErik Hugne <erik.hugne@ericsson.com>
Fri, 18 Oct 2013 05:23:21 +0000 (07:23 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 18 Oct 2013 17:20:43 +0000 (13:20 -0400)
commit1e29e3e863ae2dd2607abb7032809de95789970b
treed12bae2180f77b4dc48580bf5a85b995f1f4909c
parente845506fe405e93af280af24a5e607700d89ed22
tipc: simplify the link lookup routine

When checking statistics or changing parameters on a link, the
link_find_link function is used to locate the link with a given
name. The complex method of deconstructing the name into local
and remote address/interface is error prone and may fail if the
interface names contains special characters. We change the lookup
method to iterate over the list of nodes and compare the link
names.

Signed-off-by: Erik Hugne <erik.hugne@ericsson.com>
Reviewed-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tipc/link.c