Mailing List Archive

resolv.conf generator
Hello, I've tried to use VPNC, installed from EPEL repo (0.5.3, but no
revision number is shown). My vpnc client overrides /etc/resiolv.conf
absolutely, it doesn't append received options, it just places them instead
of old ones. vpnc-disconnect places the old resolv.conf back.
The problem is in modify_resolvconf_generic() function inside of
vpnc-script. It reads the old resolv.conf line by line and checks for
strings like "nameserver 1.2.3.4". On every match it generates a new line
with nameserver, taken from INTERNAL_IP4_DNS_TEMP variable,instead of
copying it to the new file and appending received addresses later.
For example, if I receive one nameserver address (1.2.3.4) and there are
two nameserver lines(1.1.1.1 and 2.2.2.2) in my resolv.conf, new
resolv.conf should contain only one nameserver (1.1.1.1), not three (old
nameserver address + received ones:1.2.3.4 1.1.1.1 and 2.2.2.
Regards,
Alex.
Re: resolv.conf generator [ In reply to ]
Isn't the current behavior intended?

Best regards,
Fabian


Am 29.01.2014 um 19:35 schrieb Alexei Sinitsyn <a.sinitsyn@logicify.com>:

> Hello, I've tried to use VPNC, installed from EPEL repo (0.5.3, but no revision number is shown). My vpnc client overrides /etc/resiolv.conf absolutely, it doesn't append received options, it just places them instead of old ones. vpnc-disconnect places the old resolv.conf back.
> The problem is in modify_resolvconf_generic() function inside of vpnc-script. It reads the old resolv.conf line by line and checks for strings like "nameserver 1.2.3.4". On every match it generates a new line with nameserver, taken from INTERNAL_IP4_DNS_TEMP variable,instead of copying it to the new file and appending received addresses later.
> For example, if I receive one nameserver address (1.2.3.4) and there are two nameserver lines(1.1.1.1 and 2.2.2.2) in my resolv.conf, new resolv.conf should contain only one nameserver (1.1.1.1), not three (old nameserver address + received ones:1.2.3.4 1.1.1.1 and 2.2.2.
> Regards,
> Alex.
> _______________________________________________
> vpnc-devel mailing list
> vpnc-devel@unix-ag.uni-kl.de
> https://lists.unix-ag.uni-kl.de/mailman/listinfo/vpnc-devel
> http://www.unix-ag.uni-kl.de/~massar/vpnc/