[FFmpeg-devel] [PATCH] avformat/rtpproto: add support for RTP/UDP socket reuse

Rémi Denis-Courmont remi at remlab.net
Sat Dec 31 21:34:06 EET 2022


Le maanantaina 26. joulukuuta 2022, 23.47.17 EET Nicolas George a écrit :
> "zhilizhao(赵志立)" (12022-12-26):
> > Just use the same socket file descriptor. Don’t use OS dependent hack to
> > implement a feature.
> 
> SO_REUSEADDR is absolutely not a hack.

So I agree that SO_REUSEADDR is "absolutely not a hack"... if you use it to 
recycle IP/port pair without waiting for the time-out. But that's mainly of 
interest of listening/receiving sockets.

If you use it to bind two concurrent sockets on the same IP/port pair, then it 
is absolutely not just a hack but a platform-dependent non-portable hack and a 
latent vulnerability in the OS (since one process can hijack datagrams for 
another).

-- 
レミ・デニ-クールモン
http://www.remlab.net/




More information about the ffmpeg-devel mailing list