-
Notifications
You must be signed in to change notification settings - Fork 914
Closed
Labels
Type: BugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior[core]Area: Changes in SRT library coreArea: Changes in SRT library core
Milestone
Description
calling socket is connected and not broken and srt_getpeername does not set name.
One can argues that peer address is known by app for a caller but this is probably a regression in 1.5.1 as this used to work.
Here a gdb session:
srt::CUDTUnited::getpeername (this=0x5d4648 <srt::CUDT::uglobal()::instance>, u=958115029, pw_name=0x606038, pw_namelen=0x7ff70cdacc)
at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:2110
2110 if (!pw_name || !pw_namelen)
(gdb) p *pw_namelen
$33 = 128
(gdb) n
2113 if (getStatus(u) != SRTS_CONNECTED)
(gdb)
2116 CUDTSocket* s = locateSocket(u);
(gdb)
2118 if (!s)
(gdb) p s
$34 = (srt::CUDTSocket *) 0x7fe0000a10
(gdb) n
2121 if (!s->core().m_bConnected || s->core().m_bBroken)
(gdb) p s->core().m_bConnected
$35 = {value_ = {_M_base = {static _S_alignment = 1, _M_i = true}}}
(gdb) p s->core().m_bBroken
$36 = {value_ = {_M_base = {static _S_alignment = 1, _M_i = false}}}
(gdb) n
2124 const int len = s->m_PeerAddr.size();
(gdb)
2125 if (*pw_namelen < len)
(gdb) p len
$37 = 0
(gdb) p s->m_PeerAddr
$38 = {{sin = {sin_family = 0, sin_port = 0, sin_addr = {s_addr = 0}, sin_zero = "\000\000\000\000\000\000\000"}, sin6 = {sin6_family = 0, sin6_port = 0,
sin6_flowinfo = 0, sin6_addr = {__in6_u = {__u6_addr8 = '\000' <repeats 15 times>, __u6_addr16 = {0, 0, 0, 0, 0, 0, 0, 0}, __u6_addr32 = {0, 0, 0,
0}}}, sin6_scope_id = 0}, sa = {sa_family = 0, sa_data = '\000' <repeats 13 times>}}, len = 28}
(gdb) bt
#0 srt::CUDTUnited::getpeername (this=0x5d4648 <srt::CUDT::uglobal()::instance>, u=958115029, pw_name=0x606038, pw_namelen=0x7ff70cdacc)
at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:2125
#1 0x00000000004a4244 in srt::CUDT::getpeername (u=958115029, name=0x606038, namelen=0x7ff70cdacc)
at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/api.cpp:3555
#2 0x0000000000495304 in srt_getpeername (u=958115029, name=0x606038, namelen=0x7ff70cdacc)
at /home/jdube/sandbox/makito2_project/components/vendors/haisrt/srt.git/srtcore/srt_c_api.cpp:160
#3 0x00000000004427f4 in srtconn_LogPeerInfo (srtc=0x6053b0) at ../../libraries/ravo/mxpmod_lib/srtc_mod.c:1689
#4 0x00000000004773e0 in srtconn_StateChange (srtc=0x6053b0, newstate=5) at ../../libraries/ravo/mxpmod_lib/srtc_mod.c:8380
#5 0x000000000047d390 in SrtConn_EventCB (ref=0x6053b0, event=4, data=0x0, datasz=0) at ../../libraries/ravo/mxpmod_lib/srtc_mod.c:8801
#6 0x000000000047ee78 in uepoll_Event (sock=958115029, evt=4, flags=1, lrp=0x5d3f68 <lr_unktxu>) at ../../libraries/ravo/mxpmod_lib/mxpc_uepoll.c:280
#7 0x000000000047f6b4 in uepoll_Loop (ctlfd=5) at ../../libraries/ravo/mxpmod_lib/mxpc_uepoll.c:418
#8 0x000000000047f790 in uepoll_Thread (s=0x5d3de0 <_uepollCtl+16>) at ../../libraries/ravo/mxpmod_lib/mxpc_uepoll.c:441
#9 0x0000007ff7b13fd8 in ?? () from /lib/libpthread.so.0
#10 0x0000007ffffff4a8 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb)```
Metadata
Metadata
Assignees
Labels
Type: BugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behavior[core]Area: Changes in SRT library coreArea: Changes in SRT library core