Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ppp: review applying dns settings with NetworkManager #31

Closed
mtomaschewski opened this issue May 10, 2021 · 3 comments
Closed

ppp: review applying dns settings with NetworkManager #31

mtomaschewski opened this issue May 10, 2021 · 3 comments
Assignees

Comments

@mtomaschewski
Copy link
Member

See #30

@mtomaschewski mtomaschewski self-assigned this May 10, 2021
@mtomaschewski mtomaschewski changed the title ppp: review appylying dns settings with NetworkManager ppp: review applying dns settings with NetworkManager May 10, 2021
@dkosovic
Copy link

The following response from a GNOME NetworkManager maintainer to an upstream bug report might be relevant (but ignore my USEPEERDNS related patch for NetworkManager-pptp which was wrong) :

in particular:

When NetworkManager runs other services (e.g. pppd; for VPN plugins, pppoe or WWan), then these other services should never directly configure resolve.conf. They shall return the information back to NetworkManager, and NetworkManager configures /etc/resolv.conf according to it's configuration.

It seems pppd always wants to invoke scripts like /etc/ppp/ip-up. But I think that is a misfeature and possibly there should be a way for NM to prevent that. The ip-up script shouldn't do anything in combination with NetworkManager. The Debian patch to exit when the interface is managed by NM, seems the right solution.

That's why I thought putting an exit in /etc/ppp/ip-up.d/10-netconfig if NM is used like in Debian/Ubuntu's /etc/ppp/ip-up.d/000resolvconf was a possible solution. But I guess I agree now it is not the right place and a NM compliant ip-up might be.

@mtomaschewski
Copy link
Member Author

On (OpenSUSE) systems, also NetworkManager is using netconfig and has a special way to apply it's settings to it:
netconfig modify -s NetworkManager (without -i <interface>).

There is also a network.service alias that links to the NetworkManager.service once it has been activated via systemctl enable NetworkManager.service, which netconfig checks to in order to apply the NetworkManager update policy where
an NETCONFIG_DNS_POLICY="NetworkManager" policy accepts dns setting provided with -s NetworkManager only.

But: There was a request in https://bugzilla.suse.com/show_bug.cgi?id=1079793 which has been approved by our
NetworkManager maintainers to change the default/auto netconfig policy and accept also other settings:

* Do Mai 17 2018 mt@suse.de
- version 0.84.3
- netconfig: change policy to permit non-NM settings (bsc#1079793)
  As requested and approved by NetworkManager maintainer, the 'auto'
  policy permits now also per interface settings provided by other
  services when NetworkManager is enabled. That is, the auto policy
  resolving has been changed from "STATIC_FALLBACK NetworkManager"
  to "STATIC_FALLBACK * NetworkManager".

As result, other services (like pppd in this case) are permitted to apply settings (beside of the NetworkManager)
and the netconfig and ip-up script behavior is "correct according to this decision" and I can't accept changes
that would break it.
So probably the best is to open an regression openSUSE/SLES bug report referring the above bug Url, assign it
to the NetworkManager maintainers and discuss it there... when there is a decision to revert the default policy
change, I'll do.

The workaround for the user is to set
NETCONFIG_DNS_POLICY="NetworkManager"
in /etc/sysconfig/network/config (or via yast2).

@dkosovic
Copy link

I've submitted https://bugzilla.suse.com/show_bug.cgi?id=1185882 but wasn't certain how to assign it to the NetworkManager maintainers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants