[Bug 1085756] Re: /etc/ppp/ip-up.d/000resolvconf doesn't check if envvar USEPEERDNS is set

Thomas Hood 1085756 at bugs.launchpad.net
Mon Dec 3 19:56:21 UTC 2012


The relevant code in /etc/ppp/ip-up.d/0000usepeerdns (ppp version
2.4.5-5ubuntu2) is the following.

    [ "$USEPEERDNS" ] || exit 0

That is, it only checks that the variable has some value, not that the
value is 1.  Interesting.

Should 000resolvconf do the same, or the following?

    [ "$USEPEERDNS" = 1 ] || exit 0

-- 
You received this bug notification because you are a member of Ubuntu
Foundations Bugs, which is subscribed to resolvconf in Ubuntu.
https://bugs.launchpad.net/bugs/1085756

Title:
  /etc/ppp/ip-up.d/000resolvconf doesn't check if envvar USEPEERDNS is
  set

Status in “resolvconf” package in Ubuntu:
  Confirmed

Bug description:
  Description:
  When running pppd without "usepeerdns", resolvconf's scripts will take the DNS information from the IPCP.
  In the script, it just checks to see if the DNS envvars are set and ignores whether or not we actually want to use it.
  In the PPP provided script 0000dns, it checks the USEPEERDNS envvar and prevents this from happening.

  Per PPP manpage:
  "
  Scripts
  [..]
  DNS1
  If the peer supplies DNS server addresses, this variable is set to the first DNS server address supplied.
  DNS2
  If the peer supplies DNS server addresses, this variable is set to the second DNS server address supplied.
  "

  The script makes an assumption that DNS1 and DNS2 are only set if
  "usepeerdns" is enabled, but manpage clearly indicates it will set
  this envvar regardless of "usepeerdns" if IPCP receives them.

  Conditions:
  "usepeerdns" is not configured and IPCP provides DNS servers

  Workaround:
  chmod -x /etc/ppp/ip-up.d/000resolvconf 

  
  Affected versions:
  Tested in precise but verified scripts the same in more recent releases.

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/resolvconf/+bug/1085756/+subscriptions




More information about the foundations-bugs mailing list