Bug 27665

Summary: NetworkManager doesn't honor specified methods for the PPTP VPN links
Product: Sisyphus Reporter: (GalaxyMaster) <galaxy4public>
Component: NetworkManager-pptpAssignee: Mikhail Efremov <sem>
Status: CLOSED FIXED QA Contact: qa-sisyphus
Severity: normal    
Priority: P3 CC: sem
Version: unstable   
Hardware: all   
OS: Linux   
Attachments:
Description Flags
conditionaly enable usepeerdns to pppd subprocess none

Description (GalaxyMaster) 2012-08-24 19:25:35 MSK
The ipv4.ignore-auto-dns setting is ignored for PPTP connections, hence it's impossible to setup a PPTP connection that doesn't use the server supplied DNS servers.

The reason for this is that NetworkManager-pptp is written is such a way that it uses hardcoded options for pppd, e.g. 'usepeerdns', and when pppd establishes the connection the /etc/ppp/ip-up script is executed.  The script will overwrite /etc/resolv.conf if 'usepeerdns' was supplied to pppd.

I'm attaching a quick fix that makes the ipv4.ignore-auto-dns setting to be honored by NetworkManager-pptp.  The attached patch is a bit dirty, but it works.  Feel free to add error checking and stuff, or you can leave it as is since it's a not that critical part.
Comment 1 (GalaxyMaster) 2012-08-24 19:28:08 MSK
Created attachment 5548 [details]
conditionaly enable usepeerdns to pppd subprocess
Comment 2 (GalaxyMaster) 2012-08-24 19:40:12 MSK
I've also contacted Dan Williams at RH (one of the current upstream maintainers) and provided him with the patch file, JFYI.
Comment 3 Mikhail Efremov 2012-08-24 20:43:40 MSK
Thanks, this patch looks reasonable. Maybe I'll do some cleanup for it and then apply it.
Or maybe Dan commit the patch and then I'll just take it from upstream's git ;)
Comment 4 Mikhail Efremov 2013-02-19 16:13:06 MSK
Is there any news from Dan? I don't see such commit in the upstream git.
Comment 5 Repository Robot 2013-02-21 18:16:14 MSK
NetworkManager-pptp-0.9.8.0-alt1 -> sisyphus:

* Thu Feb 21 2013 Mikhail Efremov <sem@altlinux> 0.9.8.0-alt1
- Treat warrnings as errors again.
- Conditionally enable 'usepeerdns' pppd option (by GalaxyMaster)
    (closes: #27665).
- Updated to 0.9.8.0.