Skip to content

Commit

Permalink
tipc: fix bug in bundled buffer reception
Browse files Browse the repository at this point in the history
In commit ec8a2e5 ("tipc: same receive
code path for connection protocol and data messages") we omitted the
the possiblilty that an arriving message extracted from a bundle buffer
may be a multicast message. Such messages need to be to be delivered to
the socket via a separate function, tipc_sk_mcast_rcv(). As a result,
small multicast messages arriving as members of a bundle buffer will be
silently dropped.

This commit corrects the error by considering this case in the function
tipc_link_bundle_rcv().

Signed-off-by: Jon Maloy <jon.maloy@ericsson.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
Jon Paul Maloy authored and David S. Miller committed Oct 18, 2014
1 parent 870c315 commit 643566d
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion net/tipc/link.c
Original file line number Diff line number Diff line change
Expand Up @@ -1924,7 +1924,12 @@ void tipc_link_bundle_rcv(struct sk_buff *buf)
}
omsg = buf_msg(obuf);
pos += align(msg_size(omsg));
if (msg_isdata(omsg) || (msg_user(omsg) == CONN_MANAGER)) {
if (msg_isdata(omsg)) {
if (unlikely(msg_type(omsg) == TIPC_MCAST_MSG))
tipc_sk_mcast_rcv(obuf);
else
tipc_sk_rcv(obuf);
} else if (msg_user(omsg) == CONN_MANAGER) {
tipc_sk_rcv(obuf);
} else if (msg_user(omsg) == NAME_DISTRIBUTOR) {
tipc_named_rcv(obuf);
Expand Down

0 comments on commit 643566d

Please sign in to comment.