On 1/11/21 9:20 AM, Xue, Ying wrote:
-       seq = &dest->addr.nameseq;
-       if (dest->addrtype == TIPC_ADDR_MCAST)
-               return tipc_sendmcast(sock, seq, m, dlen, timeout);
-
-       if (dest->addrtype == TIPC_SERVICE_ADDR) {
-               type = dest->addr.name.name.type;
-               inst = dest->addr.name.name.instance;
-               dnode = dest->addr.name.domain;
-               dport = tipc_nametbl_lookup_anycast(net, type, inst, &dnode);
-               if (unlikely(!dport && !dnode))
+       /* Determine destination */
+       if (atype == TIPC_SERVICE_RANGE) {

[Ying] Regarding my understanding, we should compare "atype" with 
TIPC_ADDR_MCAST rather than TIPC_SERVICE_RANGE. Please help to confirm.
Right. Except that they are the same (value == 1). I wanted to simplify by only using one of the macros inside the kernel code.

///jon


+               return tipc_sendmcast(sock, &ua->sr, m, dlen, timeout);
+       } else if (atype == TIPC_SERVICE_ADDR) {
+               skaddr.node = ua->lookup_node;
+               ua->scope = skaddr.node ? TIPC_NODE_SCOPE : TIPC_CLUSTER_SCOPE;
+               if (!tipc_nametbl_lookup_anycast(net, ua, &skaddr))
                        return -EHOSTUNREACH;




_______________________________________________
tipc-discussion mailing list
tipc-discussion@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tipc-discussion

Reply via email to