Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 260450 - net-dns/openresolv-2.0.1: adds vpn dns entries incorrectly to resolv.conf
Summary: net-dns/openresolv-2.0.1: adds vpn dns entries incorrectly to resolv.conf
Status: RESOLVED UPSTREAM
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: AMD64 Linux
: High normal
Assignee: Jim Ramsay (lack) (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-02-26 22:09 UTC by Wil Reichert
Modified: 2009-07-24 13:32 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Work properly for resolv.confs without metrics (openresolv-nometric.diff,1.76 KB, patch)
2009-03-18 09:47 UTC, Roy Marples
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Wil Reichert 2009-02-26 22:09:53 UTC
When connecting to a vpn, the nameserver entry from that vpn connection is added after the one I normally use in resolv.conf.  VPNs using both vpnc and pptp both behave the same.

Reproducible: Always

Steps to Reproduce:
my relevent configuration from /etc/conf.d/net

config_eth0=( "10.0.0.10 netmask 255.255.255.0 broadcast 10.0.0.255" )
routes_eth0=( "default via 10.0.0.1" )
dns_domain_eth0="xxx.org"
dns_servers_eth0="10.0.0.1"

which results in the following resolv.conf

# Generated by resolvconf
search xxx.org
nameserver 10.0.0.1

Using openresolv-2.0, I start my pptp connection and correctly get the following my resolv.conf

# Generated by resolvconf
search xxx.org yyy.com
nameserver 10.0.10.10
nameserver 10.0.0.1

using openresolv-2.0.1 I get

# Generated by resolvconf
search xxx.org yyy.com
nameserver 10.0.0.1
nameserver 10.0.10.10

which won't resolve any names on the vpn connection.
Comment 1 Wil Reichert 2009-03-17 20:26:37 UTC
Updated to net-dns/openresolv-3.0 today, problem still exists.
Comment 2 Roy Marples 2009-03-18 07:08:28 UTC
You neglected to state baselayout or openrc version.
Anyway, could you post the output of the following please?

ls -l /var/run/resolvconf/metrics
Comment 3 Roy Marples 2009-03-18 09:47:59 UTC
Created attachment 185393 [details, diff]
Work properly for resolv.confs without metrics

I think this is the issue you're having.
With the new metric support we added in 2.0 everything got a metric. We then fixed metric to actually work in 2.0.1. However, this also meant that the dynamic ordering based in interface name stopped working. This patch only works like so now

dynamic order
metric order
everything else

You will have to restart all your interfaces for this to work though.
Comment 4 Wil Reichert 2009-03-18 13:55:32 UTC
(In reply to comment #2)
> You neglected to state baselayout or openrc version.
> Anyway, could you post the output of the following please?
> 
> ls -l /var/run/resolvconf/metrics

sys-apps/openrc-0.4.3-r1
sys-apps/baselayout-2.0.0

ls -l /var/run/resolvconf/metrics
total 16
-rw-r--r-- 1 root root 2 Mar 15 11:06 0000000 bond0
-rw-r--r-- 1 root root 2 Jan  7 20:17 0000000 eth2
-rw-r--r-- 1 root root 2 Mar 15 11:06 0000000 lo
-rw------- 1 root root 2 Mar 18 06:35 0000000 ppp0

I have no eth2, bond0 is eth0 & eth1 bonded, ppp0 is one of my vpn connections (pptp), the other is tun0 (vpnc) which isn't listed.
Comment 5 Roy Marples 2009-03-18 14:05:48 UTC
(In reply to comment #4)
> ls -l /var/run/resolvconf/metrics
> total 16
> -rw-r--r-- 1 root root 2 Mar 15 11:06 0000000 bond0
> -rw-r--r-- 1 root root 2 Jan  7 20:17 0000000 eth2
> -rw-r--r-- 1 root root 2 Mar 15 11:06 0000000 lo
> -rw------- 1 root root 2 Mar 18 06:35 0000000 ppp0

Yeah, the above patch should fix that.

> I have no eth2, bond0 is eth0 & eth1 bonded, ppp0 is one of my vpn connections
> (pptp), the other is tun0 (vpnc) which isn't listed.

eth2 must have existed at some point though. /var/run is deleted when the system reboots, or goes from single user to multiuser. So it's been up a long time?

Anyway, you can manually delete the instance
resolvconf -d eth2
Comment 6 Wil Reichert 2009-03-18 14:37:50 UTC
(In reply to comment #3)

That patch fixes the problem, thanks.
Comment 7 Roy Marples 2009-03-19 11:11:10 UTC
This is fixed in openresolv-3.1.1 which is now in portage.
Comment 8 Jim Ramsay (lack) (RETIRED) gentoo-dev 2009-07-24 13:32:21 UTC
(In reply to comment #7)
> This is fixed in openresolv-3.1.1 which is now in portage.

You said it.  Closing.