Bug 27665 - NetworkManager doesn't honor specified methods for the PPTP VPN links
Summary: NetworkManager doesn't honor specified methods for the PPTP VPN links
Status: CLOSED FIXED
Alias: None
Product: Sisyphus
Classification: Development
Component: NetworkManager-pptp (show other bugs)
Version: unstable
Hardware: all Linux
: P3 normal
Assignee: Mikhail Efremov
QA Contact: qa-sisyphus
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-24 19:25 MSK by (GalaxyMaster)
Modified: 2013-02-21 18:16 MSK (History)
1 user (show)

See Also:


Attachments
conditionaly enable usepeerdns to pppd subprocess (1.05 KB, patch)
2012-08-24 19:28 MSK, (GalaxyMaster)
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.