From: Allan Stephens Date: Sun, 17 Apr 2011 20:02:11 +0000 (-0400) Subject: tipc: Set name lookup scope field properly in all data messages X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=53b94364a7c96d3b2276cb2bbbecfb269bc9f0fc;p=mv-sheeva.git tipc: Set name lookup scope field properly in all data messages Ensures that all outgoing data messages have the "name lookup scope" field of their header set correctly; that is, named multicast messages now specify cluster-wide name lookup, while messages not using TIPC naming zero out the lookup field. (Previously, the lookup scope specified for these types of messages was inherited from the last message sent by the sending port.) Signed-off-by: Allan Stephens Signed-off-by: Paul Gortmaker --- diff --git a/net/tipc/port.c b/net/tipc/port.c index 6ff78f9c7d6..c2229c4b18e 100644 --- a/net/tipc/port.c +++ b/net/tipc/port.c @@ -91,6 +91,7 @@ int tipc_multicast(u32 ref, struct tipc_name_seq const *seq, hdr = &oport->phdr; msg_set_type(hdr, TIPC_MCAST_MSG); + msg_set_lookup_scope(hdr, TIPC_CLUSTER_SCOPE); msg_set_nametype(hdr, seq->type); msg_set_namelower(hdr, seq->lower); msg_set_nameupper(hdr, seq->upper); @@ -1065,6 +1066,7 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer) msg_set_orignode(msg, tipc_own_addr); msg_set_origport(msg, p_ptr->ref); msg_set_type(msg, TIPC_CONN_MSG); + msg_set_lookup_scope(msg, 0); msg_set_hdr_sz(msg, SHORT_H_SIZE); p_ptr->probing_interval = PROBING_INTERVAL; @@ -1276,6 +1278,7 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest, msg = &p_ptr->phdr; msg_set_type(msg, TIPC_DIRECT_MSG); + msg_set_lookup_scope(msg, 0); msg_set_orignode(msg, tipc_own_addr); msg_set_origport(msg, ref); msg_set_destnode(msg, dest->node);