>Subject: Re: [PATCH net] tipc: don't set SYN on multicast from connection- >oriented sockets > >On Mon, Nov 30, 2026 at 04:01:57PM +0000, Tung Quang Nguyen wrote:
>> I do not understand above writing. >> Can you demonstrate by using current code (what functions, what lines) ?
> >Sure, this is on net-next f89726ffabef. A SEQPACKET or STREAM socket that isn't >connected sends through __tipc_sendmsg() (for STREAM, via >tipc_sendstream()). For a connection-oriented socket, __tipc_sendmsg() sets >SYN in the socket's header at net/tipc/socket.c:1463, msg_set_syn(hdr, 1), >before it looks at the address type. For a TIPC_SERVICE_RANGE destination it >then calls tipc_sendmcast(), so the multicast goes out with SYN set. A range >send doesn't connect the socket, so every later range send from it sets SYN >again.
This is an invalid usecase and TIPC should have rejected it. Please take a look at : https://tipc.sourceforge.net/programming.html In "1.3.2. Connection Oriented Messaging", I quote: " The address types used can be any of service address or socket address (client side), or service address or service range (server side). " So, a client cannot use service range. This is a missing handling of current TIPC code. I will post the fix for it: Signed-off-by: Tung Nguyen <tung…@est.tech> --- net/tipc/socket.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/net/tipc/socket.c b/net/tipc/socket.c index c607563bb35a..1366c6a49d79 100644 --- a/net/tipc/socket.c +++ b/net/tipc/socket.c @@ -1458,6 +1458,8 @@ static int __tipc_sendmsg(struct socket *sock, struct msghdr *m, size_t dlen) return -EISCONN; if (tsk->published) return -EOPNOTSUPP; + if (atype == TIPC_SERVICE_RANGE) + return -EINVAL; if (atype == TIPC_SERVICE_ADDR) tsk->conn_addrtype = atype; msg_set_syn(hdr, 1); @@ -2377,6 +2379,7 @@ static void tipc_sk_filter_rcv(struct sock *sk, struct sk_buff *skb, hdr = buf_msg(skb); limit = rcvbuf_limit(sk, skb); if ((sk_conn && !tipc_sk_filter_connect(tsk, skb, xmitq)) || + (!sk_conn && msg_is_syn(hdr) && mtyp != TIPC_MCAST_MSG) || (!sk_conn && msg_connected(hdr)) || (!grp && msg_in_group(hdr))) err = TIPC_ERR_NO_PORT; Thanks for your report and reproducer. --- pw-bot: rejected