Disable IPv6

This forum is about all development around libVLC.
haloweenj
New Cone
New Cone
Posts: 3
Joined: 11 May 2018 18:22

Disable IPv6

Postby haloweenj » 11 May 2018 18:44

Hello,

I made a small linux program that uses libVLC to simulate remote video playback without actually rendering the video (to test if playback stops due to buffer underrun).

This is working fine, but I needed to turn IPv6 off so that, when performing DNS resolution, no AAAA queries are sent.

I was going to try to pass the --ipv4 arg to libvlc_new(), but I just found out that this option is no longer supported since 2.0.0 (I'm using 3.0.0). I've crawled through both the command line and API documentation, but I cannot find any alternative.

Is there any way to disable IPv6 with version 3.0.0?

Thank you for your help.

Rémi Denis-Courmont
Developer
Developer
Posts: 15266
Joined: 07 Jun 2004 16:01
VLC version: master
Operating System: Linux
Contact:

Re: Disable IPv6

Postby Rémi Denis-Courmont » 11 May 2018 19:46

That depends on the OS, this is not in scope of LibVLC.
Rémi Denis-Courmont
https://www.remlab.net/
Private messages soliciting support will be systematically discarded

haloweenj
New Cone
New Cone
Posts: 3
Joined: 11 May 2018 18:22

Re: Disable IPv6

Postby haloweenj » 14 May 2018 12:40

Hello Rémi,

I agree with you in principle, but that is not the case with most applications and libs in linux. I've tried

Code: Select all

sysctl -w net.ipv6.conf.all.disable_ipv6=1
but there were still DNS queries for both A and AAAA records. From what I could gather, there is not other way on linux to disable DNS AAAA requests. Maybe that's why other libs (e.g. libcurl) and applications (e.g. wget, ping) have options to force IPv4 or IPv6 and, apparently, so did VLC at one time.

Anyway, if you know of a way to disable these requests at the OS level, please let me know.

User avatar
InTheWings
Developer
Developer
Posts: 1275
Joined: 07 Aug 2013 13:15
VLC version: crashing
Operating System: Linux
Contact:

Re: Disable IPv6

Postby InTheWings » 14 May 2018 12:44

dns queries does depend on nsswitch, not configured ip.
:!: If you want your problem to be solved :
* First read troubleshooting guide VSG:Main
* Always provide verbose LOGS ! (command line or from gui)
* Always check your issue against a developer build from Nightly Build of VLC
* Tell us when your problem is solved !

haloweenj
New Cone
New Cone
Posts: 3
Joined: 11 May 2018 18:22

Re: Disable IPv6

Postby haloweenj » 14 May 2018 13:48

Yes but, AFAIK, there is no configuration on the nsswitch to disable AAAA DNS queries.


Return to “Development around libVLC”

Who is online

Users browsing this forum: No registered users and 21 guests