From: Andrew Stellman <bugs@stellman-greene.com>
To: Tung Quang Nguyen <tung.quang.nguyen@est.tech>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Simon Horman <horms@kernel.org>,
netdev@vger.kernel.org, tipc-discussion@lists.sourceforge.net,
linux-kernel@vger.kernel.org, Jon Maloy <jmaloy@redhat.com>
Subject: Re: [PATCH net] tipc: don't set SYN on multicast from connection-oriented sockets
Date: Mon, 30 Nov 2026 12:22:19 -0500 [thread overview]
Message-ID: <20261130172219.69694-1-bugs@stellman-greene.com> (raw)
In-Reply-To: <AM7P189MB11375DA66F9F1585FC19B774C64E2@AM7P189MB1137.EURP189.PROD.OUTLOOK.COM>
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.
On the receiving node, tipc_sk_filter_rcv() hands the message to
tipc_mcast_filter_msg(), which puts a SYN message it can't match to a
sync message on mc_method.deferredq instead of the receive queue. In
my test the first range send from each socket got through, because
tipc_mcast_xmit() also sent a sync message (tipc_mcast_send_sync())
when it chose the multicast method. The second one had no matching
sync message and never reached the receiver.
> Can you demonstrate by using current code (what functions, what lines) ?
The patch changes that one line to
msg_set_syn(hdr, atype != TIPC_SERVICE_RANGE), so a range send no
longer sets SYN. TIPC_SERVICE_ADDR and TIPC_SOCKET_ADDR destinations
still set it, so connection setup doesn't change.
> Please show me what KASAN reported ?
Nothing. KASAN was enabled in the test kernel and didn't report
anything, with or without the patch. The problem isn't a memory error;
the second range send just never arrives at the remote receiver.
> Definitely. I need your reproducer to understand the problem.
I'll send it to you off-list.
Andrew
prev parent reply other threads:[~2026-11-30 17:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-11-29 14:49 [PATCH net] tipc: don't set SYN on multicast from connection-oriented sockets Andrew Stellman
2026-11-30 16:01 ` Tung Quang Nguyen
2026-11-30 17:22 ` Andrew Stellman [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20261130172219.69694-1-bugs@stellman-greene.com \
--to=bugs@stellman-greene.com \
--cc=davem@davemloft.net \
--cc=edumazet@kernel.org \
--cc=horms@kernel.org \
--cc=jmaloy@redhat.com \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=tipc-discussion@lists.sourceforge.net \
--cc=tung.quang.nguyen@est.tech \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox