-
Notifications
You must be signed in to change notification settings - Fork 837
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
Listening on IPv6 any ([::]) fails because of SRTO_BINDTODEVICE #1481
Comments
Revisiting the fix to this problem: one line of this problem description was ignored:
The fix was to add the AF_INET line but m_BindToDevice should be empty. this CChannel member is not initialized.. |
Or the default std::string constructor initialized it. Meanwhile my use case should not enter that if{} branch. |
Excuse me, but I don't understand the problem. Yes, m_BindToDevice should be empty, as default-initialized. This now belongs to a bigger object of Am I getting it right, you have a case when the app didn't set this value but it wasn't an empty string? |
Yes, application is not setting this value. I remember this problem I reported and that it was fixed but I just bumped on the fix while investigating the SRTO_BINDTODEVICE implementation. I will gdb to confirm. |
What is interesting, especially for the fields that should keep a string there's a type that allows to keep them as a fixed size character array. The m_BindToDevice is an exception. |
I retrieved the original code causing this problem (commit 4aa6fbb) and m_BindAddr.family != AF_INET generated an exception outside the !m_BindToDevice.empty() condition causing any IPv6 address binding to fail. I reopened issue while not understanding the fix. Closing issue.
|
listening on IPv6 any ([::]) no longer work with commit 4aa6fbb
11:23:39.842698 mxptool: setUDPSockOpt(channel.cpp:264): /App:Rx*E:SRT.c: SRTO_BINDTODEVICE can only be set with AF_INET connections
Application is not setting SRTO_BINDTODEVICE:
Breakpoint 1, CChannel::setUDPSockOpt (this=0x7fffe8008020) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/channel.cpp:264 264 LOGC(mglog.Error, log << "SRTO_BINDTODEVICE can only be set with AF_INET connections"); (gdb) bt #0 CChannel::setUDPSockOpt (this=0x7fffe8008020) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/channel.cpp:264 #1 0x000000000046f7f3 in CChannel::open (this=0x7fffe8008020, addr=...) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/channel.cpp:128 #2 0x000000000045b9f8 in CUDTUnited::updateMux (this=0x707600, s=0x7fffe8000d90, addr=..., udpsock=<optimized out>) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:2624 #3 0x000000000045cb09 in CUDTUnited::bind (this=0x707600, s=0x7fffe8000d90, name=...) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:864 #4 0x000000000045ccbd in CUDT::bind (u=<optimized out>, name=<optimized out>, namelen=<optimized out>) at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:3013 #5 0x00000000004399a9 in srtconn_Open (srtc=0x718cd0, newsa=0x7175a0, newsalen=28, flags=0) at ../../libraries/naga/mxpmod_lib/srtc_mod.c:1842 #6 0x000000000043b2bc in SrtConn_Open (mxpc=0x718cd0, newsa=0x7175a0, newsalen=28, flags=0) at ../../libraries/naga/mxpmod_lib/srtc_mod.c:2093 #7 0x0000000000408772 in srtApp_LoopbackCx (loopcx=0x716870) at mxptool.c:376 #8 0x0000000000408d4c in srtApp_TxData (ref=0x716870, rxmsg=0x7fffe8000990) at mxptool.c:489 #9 0x000000000040953b in srtApp_RxProc (ref=0x715960, rxmsg=0x7fffe8000990) at mxptool.c:683 #10 0x0000000000409ab9 in srtApp_RxLoop (cx=0x715960) at mxptool.c:877 #11 0x000000000040b42b in srtApp_CxLoop (cx=0x715960, ai=0x7166c0, openf=0) at mxptool.c:1536 #12 0x000000000040b84b in srtApp_CxThread (s=0x715960) at mxptool.c:1595 #13 0x00007ffff74e9e9a in start_thread () from /lib/x86_64-linux-gnu/libpthread.so.0 #14 0x00007ffff6afd2ed in clone () from /lib/x86_64-linux-gnu/libc.so.6 #15 0x0000000000000000 in ?? ()
The text was updated successfully, but these errors were encountered: