-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Murmur assumes clients are UDP capable by default #6311
Comments
That's the best option, imo. |
I do think so, too. But I do also think that murmur shouldn't assume UDP by default, all the setup is exchanged over TCP. Ideally, adding a As you said, yourself in the matrix chat UDP-TCP switching isn't the best right now, allowing clients and servers to specify what they actually want would be a pretty good step in making it more robust. Also, (might be a different discussion) but if the client/server sets forced TCP, should it still send |
No, Note that this is already done in #5931 while working on #5517. I believe once this PR gets merged the only thing to fix this issue as well would be to default to TCP transmission until UDP is ready to go, right?
I'm not sure much would be gained from adding extra logic that prevents pings in cases where client and/or server willingly switched to TCP vs UDP just having broken down somewhere in the middle of a connection. To me this sounds like a bit fiddly to get right and thus the implementation would introduce some level of complexity into the code base that I don't think would be worth it. 🤔 |
Sorry for the delayed response, must have missed the email! I agree, after thinking about it a bit more,
Ah yes, I didn't see these, sorry!
I'm just pointing out that if the "Force TCP" checkbox is set, a user would expect that their client will send absolutely nothing via UDP. I don't really have a real life scenario where that would matter to the point of getting a check implemented, in mumble, tho. If it's really that important, they can drop the outgoing traffic with the firewall. I agree that it would require a bunch of time and will introduce complexity, and as you said, I'm not sure if it's that worth it. |
Description
Murmur assumes that clients are UDP capable by default.
It only switches to TCP when it receives a
UDPTunnel
packet (seesrc/murmur/Server.cpp#L1764
)This is an issue for listen-only clients that can't use UDP.
Since they don't send audio, they will never send the
UDPTunnel
packet, which means the server will incorrectly send the data over UDP and the client will never receive it.If the client uses the
Force TCP
options but can actually receive UDP it will still work because the whole UDP receive chain bypasses the forced TCP check.Steps to reproduce
Force TCP
Mumble version
1.5.517
Mumble component
Server
OS
Linux
Reproducible?
Yes
Additional information
A possible fix would be to set
aiUdpFlag
to0
in theServerUser
constructor.If the client is using UDP it will quickly be set to
1
in theUDPMessageType::Audio
handler ofsrc/murmur/Server.cpp#970
Of course, that means that the client will receive everything over TCP until he speaks (but at least the client will get it).
Another option is changing the flag in the ping handler, but it isn't the best idea because UDP pings are sent and received by the client regardless of whether it's using TCP or not. This means it wouldn't honor the
Force TCP
option of the clients.To truly solve this without compromise would require adding something like a
force_tcp
field to a TCP packet (maybe theAuthenticate
orUserState
packet?). That way the server is actually aware of the client settings and not just guessing.A truly horrible way to bypass it would be to send
\xff\xff\xff
over aUDPTunnel
packet. It's just enought to pass the length check and wouldn't be interpreted as a packet. (Currently using that while debugging my implementation)The text was updated successfully, but these errors were encountered: