linux/net/tipc
Jon Maloy b89afb116c tipc: allow closest-first lookup algorithm when legacy address is configured
The removal of an internal structure of the node address has an unwanted
side effect.
- Currently, if a user is sending an anycast message with destination
  domain 0, the tipc_namebl_translate() function will use the 'closest-
  first' algorithm to first look for a node local destination, and only
  when no such is found, will it resort to the cluster global 'round-
  robin' lookup algorithm.
- Current users can get around this, and enforce unconditional use of
  global round-robin by indicating a destination as Z.0.0 or Z.C.0.
- This option disappears when we make the node address flat, since the
  lookup algorithm has no way of recognizing this case. So, as long as
  there are node local destinations, the algorithm will always select
  one of those, and there is nothing the sender can do to change this.

We solve this by eliminating the 'closest-first' option, which was never
a good idea anyway, for non-legacy users, but only for those. To
distinguish between legacy users and non-legacy users we introduce a new
flag 'legacy_addr_format' in struct tipc_core, to be set when the user
configures a legacy-style Z.C.N node address. Hence, when a legacy user
indicates a zero lookup domain 'closest-first' is selected, and in all
other cases we use 'round-robin'.

Acked-by: Ying Xue <ying.xue@windriver.com>
Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-03-23 13:12:18 -04:00
..
addr.c tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
addr.h tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
bcast.c tipc: bcast: use true and false for boolean values 2018-03-07 12:18:00 -05:00
bcast.h tipc: make replicast a user selectable option 2017-01-20 12:10:17 -05:00
bearer.c tipc: remove restrictions on node address values 2018-03-23 13:12:18 -04:00
bearer.h tipc: some cleanups in the file discover.c 2018-03-23 13:12:17 -04:00
core.c net: Convert tipc_net_ops 2018-03-13 11:24:56 -04:00
core.h tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
diag.c tipc: implement socket diagnostics for AF_TIPC 2018-03-22 14:43:35 -04:00
discover.c tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
discover.h tipc: some cleanups in the file discover.c 2018-03-23 13:12:17 -04:00
eth_media.c tipc: make media address offset a common define 2015-02-27 18:18:48 -05:00
group.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-03-06 01:20:46 -05:00
group.h tipc: fix race between poll() and setsockopt() 2018-01-19 15:12:21 -05:00
ib_media.c tipc: rename media/msg related definitions 2015-02-27 18:18:48 -05:00
Kconfig tipc: implement socket diagnostics for AF_TIPC 2018-03-22 14:43:35 -04:00
link.c tipc: remove restrictions on node address values 2018-03-23 13:12:18 -04:00
link.h tipc: transfer broadcast nacks in link state messages 2016-09-02 17:10:24 -07:00
Makefile tipc: implement socket diagnostics for AF_TIPC 2018-03-22 14:43:35 -04:00
monitor.c tipc: fix tipc_mon_delete() oops in tipc_enable_bearer() error path 2017-12-27 10:55:00 -05:00
monitor.h tipc: dump monitor attributes 2016-07-26 14:26:42 -07:00
msg.c tipc: obsolete TIPC_ZONE_SCOPE 2018-03-17 17:11:46 -04:00
msg.h tipc: fall back to smaller MTU if allocation of local send skb fails 2017-12-01 15:21:25 -05:00
name_distr.c tipc: some name changes 2018-03-17 17:11:46 -04:00
name_distr.h tipc: some name changes 2018-03-17 17:11:46 -04:00
name_table.c tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
name_table.h tipc: some name changes 2018-03-17 17:11:46 -04:00
net.c tipc: allow closest-first lookup algorithm when legacy address is configured 2018-03-23 13:12:18 -04:00
net.h tipc: Introduce __tipc_nl_net_set 2018-02-14 14:46:33 -05:00
netlink_compat.c tipc: Fix missing RTNL lock protection during setting link properties 2018-02-14 14:46:33 -05:00
netlink.c netlink: pass extended ACK struct to parsing functions 2017-04-13 13:58:22 -04:00
netlink.h tipc: make cluster size threshold for monitoring configurable 2016-07-26 14:26:42 -07:00
node.c tipc: remove restrictions on node address values 2018-03-23 13:12:18 -04:00
node.h tipc: remove restrictions on node address values 2018-03-23 13:12:18 -04:00
socket.c tipc: step sk->sk_drops when rcv buffer is full 2018-03-22 14:43:37 -04:00
socket.h tipc: implement socket diagnostics for AF_TIPC 2018-03-22 14:43:35 -04:00
subscr.c tipc: rename tipc_server to tipc_topsrv 2018-02-16 15:26:34 -05:00
subscr.h tipc: rename tipc_server to tipc_topsrv 2018-02-16 15:26:34 -05:00
sysctl.c tipc: add name distributor resiliency queue 2014-09-01 17:51:48 -07:00
topsrv.c tipc: don't call sock_release() in atomic context 2018-02-19 14:38:50 -05:00
topsrv.h tipc: rename tipc_server to tipc_topsrv 2018-02-16 15:26:34 -05:00
udp_media.c tipc: call tipc_rcv() only if bearer is up in tipc_udp_recv() 2017-12-01 15:14:22 -05:00
udp_media.h tipc: add UDP remoteip dump to netlink API 2016-08-26 21:38:41 -07:00