aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/port.c
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-04-17 16:02:11 -0400
committerPaul Gortmaker <paul.gortmaker@windriver.com>2011-05-10 16:03:50 -0400
commit53b94364a7c96d3b2276cb2bbbecfb269bc9f0fc (patch)
tree8a467e2af2d4d3856e8cb966afa0bbf14df5817c /net/tipc/port.c
parent77561557447d3be586e701815e261c93c11ded00 (diff)
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 <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc/port.c')
-rw-r--r--net/tipc/port.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/net/tipc/port.c b/net/tipc/port.c
index 6ff78f9c7d65..c2229c4b18ef 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,
91 91
92 hdr = &oport->phdr; 92 hdr = &oport->phdr;
93 msg_set_type(hdr, TIPC_MCAST_MSG); 93 msg_set_type(hdr, TIPC_MCAST_MSG);
94 msg_set_lookup_scope(hdr, TIPC_CLUSTER_SCOPE);
94 msg_set_nametype(hdr, seq->type); 95 msg_set_nametype(hdr, seq->type);
95 msg_set_namelower(hdr, seq->lower); 96 msg_set_namelower(hdr, seq->lower);
96 msg_set_nameupper(hdr, seq->upper); 97 msg_set_nameupper(hdr, seq->upper);
@@ -1065,6 +1066,7 @@ int tipc_connect2port(u32 ref, struct tipc_portid const *peer)
1065 msg_set_orignode(msg, tipc_own_addr); 1066 msg_set_orignode(msg, tipc_own_addr);
1066 msg_set_origport(msg, p_ptr->ref); 1067 msg_set_origport(msg, p_ptr->ref);
1067 msg_set_type(msg, TIPC_CONN_MSG); 1068 msg_set_type(msg, TIPC_CONN_MSG);
1069 msg_set_lookup_scope(msg, 0);
1068 msg_set_hdr_sz(msg, SHORT_H_SIZE); 1070 msg_set_hdr_sz(msg, SHORT_H_SIZE);
1069 1071
1070 p_ptr->probing_interval = PROBING_INTERVAL; 1072 p_ptr->probing_interval = PROBING_INTERVAL;
@@ -1276,6 +1278,7 @@ int tipc_send2port(u32 ref, struct tipc_portid const *dest,
1276 1278
1277 msg = &p_ptr->phdr; 1279 msg = &p_ptr->phdr;
1278 msg_set_type(msg, TIPC_DIRECT_MSG); 1280 msg_set_type(msg, TIPC_DIRECT_MSG);
1281 msg_set_lookup_scope(msg, 0);
1279 msg_set_orignode(msg, tipc_own_addr); 1282 msg_set_orignode(msg, tipc_own_addr);
1280 msg_set_origport(msg, ref); 1283 msg_set_origport(msg, ref);
1281 msg_set_destnode(msg, dest->node); 1284 msg_set_destnode(msg, dest->node);