-
Notifications
You must be signed in to change notification settings - Fork 341
BadFormat for message/cookie error (CLASSIC-STUN) #444
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
Comments
It should work by default! The STUN packets are responded too automatically. That error message is suggesting we aren't actually getting a STUN packet. Could you do wireshark/tcpdump and see if the TURN server is wrong? |
Thanks for responding. I'm getting the same error reports from deployed pion turn servers but they say "Failed to handle datagram: failed to create stun message from packet: BadFormat for message/cookie: 0 is invalid magic cookie (should be 2112a442)" I think some clients are probably using some older STUN version. edit: had a report that chrome on windows 10 is also causing this issue |
OK it looks like i've run into Compatability notes This is a bit of a show-stopper if windows 10 clients and linux clients are still using that RFC and it completely breaks the functionality of this library. |
Source of the reported issue here. Let me know if i can test something or provide with extra info. I have been using win 10 on server side and chrome client on desktop and mobile and been getting these issues |
I know i'm missing something obvious here. The examples seem to demonstrate setting this up as STUN or TURN. TURN should also support STUN right?
When I run it as a TURN server and test it from stun client (on ubuntu) I get errors like
OnTurnServerOutput: turn ERROR: 2025/02/23 10:27:36 Failed to handle datagram: failed to create stun message from packet: BadFormat for message/cookie: 1c0265f is invalid magic cookie (should be 2112a442)
OnTurnServerOutput: turn ERROR: 2025/02/23 10:27:36 Failed to handle datagram: failed to create stun message from packet: BadFormat for message/cookie: 203e909 is invalid magic cookie (should be 2112a442)
OnTurnServerOutput: turn ERROR: 2025/02/23 10:27:36 Failed to handle datagram: failed to create stun message from packet: BadFormat for message/cookie: 3c0a820 is invalid magic cookie (should be 2112a442)
OnTurnServerOutput: turn ERROR: 2025/02/23 10:27:36 Failed to handle datagram: failed to create stun message from packet: BadFormat for message/cookie: 19c1239 is invalid magic cookie (should be 2112a442)
Do I need to do anything special to support both? Is the AuthHandler being called for Binding requests?
The text was updated successfully, but these errors were encountered: