-
Notifications
You must be signed in to change notification settings - Fork 326
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
Add dns suffix information to informative message #636
Conversation
I understand NetworkManager-fortivpnssl does not get the name servers and search domains directly from openfortivpn, instead the information is passed to pppd (hence the And indeed the
Here you argue the information should be retrieved directly from openfortivpn. Am I correct? |
We understand the same thing about pppd, and you are correct, I'm talking about enabling a direct conversation between the networkmanager plugin and openfortivpn. My thinking is that networkmanager can handle the resolv.conf file by itself, without the help of pppd. Also, this could be a first step to getting the networkmanager plugin handle the "Two-factor authentication token" prompt (which is another topic). But all of this is a bit of a stretch, it requires a lot more work to have a nice integration between networkmanager and openfortivpn. |
It would help to document the desired interaction between openfortivpn and NetworkManager-fortivpnssl. For example we could add openfortivpn plugins, the same way pppd supports plugins. But frankly this looks like overkill. I don't think NetworkManager needs openfortivpn to execute specific code. Rather some kind of limited interprocess communication (IPC) is required. On Linux D-BUS has become a standard for IPC between system components. Note that openfortivpn already notifies systemd, precisely after setting routes and DNS - or not: Line 127 in 8b0c235
Perhaps it wouldn't be too complicated to get openfortivpn to notify NetrowkManager as well as systemd. Then it would be up to the calling program to manage routing and DNS (whether the calling program is NetworkManager or a script bundled with openfortivpn). Thus openfortivpn could focus on what it does best: initiate the communication with a FortiGate appliance and "spawn a pppd process and operate the communication between the gateway and this process". |
I totally agree with what you say, an proper, simple IPC channel is the way. Please reject my PR and let's start thinking about it. Also, I found out that there is something started in this direction with how TFA is handled (--pinentry). At the moment I could not make it work with SMS, but maybe it's just me. |
@charlesgoyard That said printing the search domain makes sense, not only to help improving NetworkManager-fortisslvpn but also for debugging and information. A couple comments:
|
76a0bba
to
d00c041
Compare
d00c041
to
ba04476
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more intrusive change with respect to the rest of the code is moving MAX_DOMAIN_LENGTH
from xml.h
to ipv4.h
. We now have to include ipv4.h
from xml.c
but it makes sense: domain length has more to do with IP than XML!
Thanks! Nice cleanups as a bonus. |
Note that callbacks for setting IP routes and name resolution might not be a bad idea after all. See: |
Hi,
I found out that printing the dns suffixes could be a first step to enable networknanager-fortisslvpn to scrape this information, and then report it back to whatever handles resolv.conf in NetworkManager. For now this information is not used by pppd.
On the other end, I think adding a stable parsable output would be a more appropriate, proper solution.
Sample output: