[vlc-devel] [PATCH 1/2] smb2: favor IPv4 over IPv6

Martin Storsjö martin at martin.st
Fri Nov 6 22:05:50 CET 2020


On Fri, 6 Nov 2020, Thomas Guillem wrote:

> Let the module resolve the address and favor IPv4 over IPv6.
>
> It seems that lot of servers or NAS have IPv6 support but have firewall
> dropping the 445 port connection via IPv6 resulting on a long timeout
> when trying to connect.
> ---
> modules/access/smb2.c | 37 ++++++++++++++++++++++++++++++++++---
> 1 file changed, 34 insertions(+), 3 deletions(-)

Not opposed to this, but if you want even better flexibility, I'd in 
general recommend implementing the "Happy Eyeballs" algorithm, see 
https://tools.ietf.org/html/rfc8305, and 
http://git.videolan.org/?p=ffmpeg.git;a=commitdiff;h=9b4c3f5aadf54ffd2a6e15746b1fd736379883c4
for an example of how I implemented it in ffmpeg.

// Martin



More information about the vlc-devel mailing list