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)
commitbbfbe47cc99ce093708aaf28b7f2c08d28045c67
treed12bae2180f77b4dc48580bf5a85b995f1f4909c
parent636c0371a737c27510df867161fb8100c2f086bd
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