1
0
Fork 0
alistair23-linux/net/tipc
Jon Paul Maloy d482994fca tipc: fix two bugs in secondary destination lookup
A message sent to a node after a successful name table lookup may still
find that the destination socket has disappeared, because distribution
of name table updates is non-atomic. If so, the message will be rejected
back to the sender with error code TIPC_ERR_NO_PORT. If the source
socket of the message has disappeared in the meantime, the message
should be dropped.

However, in the currrent code, the message will instead be subject to an
unwanted tertiary lookup, because the function tipc_msg_lookup_dest()
doesn't check if there is an error code present in the message before
performing the lookup. In the worst case, the message may now find the
old destination again, and be redirected once more, instead of being
dropped directly as it should be.

A second bug in this function is that the "prev_node" field in the message
is not updated after successful lookup, something that may have
unpredictable consequences.

The problems arising from those bugs occur very infrequently.

The third change in this function; the test on msg_reroute_msg_cnt() is
purely cosmetic, reflecting that the returned value never can be negative.

This commit corrects the two bugs described above.

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-03-29 13:47:36 -07:00
..
Kconfig tipc: add ip/udp media type 2015-03-05 22:08:42 -05:00
Makefile tipc: add ip/udp media type 2015-03-05 22:08:42 -05:00
addr.c tipc: fix two bugs in secondary destination lookup 2015-03-29 13:47:36 -07:00
addr.h tipc: fix two bugs in secondary destination lookup 2015-03-29 13:47:36 -07:00
bcast.c tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
bcast.h tipc: fix potential deadlock when all links are reset 2015-03-29 12:40:27 -07:00
bearer.c tipc: ensure that idle links are deleted when a bearer is disabled 2015-03-10 18:37:36 -04:00
bearer.h tipc: add ip/udp media type 2015-03-05 22:08:42 -05:00
core.c tipc: nl compat add noop and remove legacy nl framework 2015-02-09 13:20:49 -08:00
core.h tipc: remove tipc_snprintf 2015-02-09 13:20:49 -08:00
discover.c tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
discover.h tipc: involve namespace infrastructure 2015-01-12 16:24:32 -05:00
eth_media.c tipc: make media address offset a common define 2015-02-27 18:18:48 -05:00
ib_media.c tipc: rename media/msg related definitions 2015-02-27 18:18:48 -05:00
link.c tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
link.h tipc: eliminate race condition at dual link establishment 2015-03-25 14:05:56 -04:00
msg.c tipc: fix two bugs in secondary destination lookup 2015-03-29 13:47:36 -07:00
msg.h tipc: eliminate race condition at dual link establishment 2015-03-25 14:05:56 -04:00
name_distr.c tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
name_distr.h tipc: resolve race problem at unicast message reception 2015-02-05 16:00:02 -08:00
name_table.c tipc: fix a potential deadlock when nametable is purged 2015-03-17 22:11:26 -04:00
name_table.h tipc: convert legacy nl name table dump to nl compat 2015-02-09 13:20:48 -08:00
net.c tipc: nl compat add noop and remove legacy nl framework 2015-02-09 13:20:49 -08:00
net.h tipc: make tipc node table aware of net namespace 2015-01-12 16:24:32 -05:00
netlink.c tipc: move and rename the legacy nl api to "nl compat" 2015-02-09 13:20:47 -08:00
netlink.h tipc: move and rename the legacy nl api to "nl compat" 2015-02-09 13:20:47 -08:00
netlink_compat.c tipc: nl compat add noop and remove legacy nl framework 2015-02-09 13:20:49 -08:00
node.c tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
node.h tipc: involve reference counter for node structure 2015-03-29 12:40:28 -07:00
server.c tipc: withdraw tipc topology server name when namespace is deleted 2015-03-17 22:11:26 -04:00
server.h tipc: make subscriber server support net namespace 2015-01-12 16:24:33 -05:00
socket.c rhashtable: Disable automatic shrinking by default 2015-03-24 17:48:40 -04:00
socket.h tipc: fix netns refcnt leak 2015-03-17 22:11:26 -04:00
subscr.c tipc: fix nullpointer bug when subscribing to events 2015-02-27 18:18:47 -05:00
subscr.h tipc: make subscriber server support net namespace 2015-01-12 16:24:33 -05:00
sysctl.c tipc: add name distributor resiliency queue 2014-09-01 17:51:48 -07:00
udp_media.c tipc: fix compile error when IPV6=m and TIPC=y 2015-03-24 15:20:29 -04:00