After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 761717 - dnsmasq.d for shared connections
dnsmasq.d for shared connections
Status: RESOLVED FIXED
Product: NetworkManager
Classification: Platform
Component: general
git master
Other Linux
: Normal enhancement
: ---
Assigned To: NetworkManager maintainer(s)
NetworkManager maintainer(s)
: 731074 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2016-02-08 14:37 UTC by chrysn
Modified: 2016-04-12 14:08 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
patch for including /etc/NetworkManager/dnsmasq-shared.d/ (1.33 KB, patch)
2016-02-12 07:03 UTC, chrysn
none Details | Review

Description chrysn 2016-02-08 14:37:28 UTC
it seems that there is no way the behavior of dnsmasq can be customized when used for shared connections. this would be required, for example, to set pxe parameters (the full use case is "my laptop is in the wifi, i want to setup another one. i link them up via ethernet, set up a tftp and http server independently of network-manager, and need to insert a line of config into the dnsmasq running on the ethernet interface to make the other laptop boot off mine").

there exist facilities for /etc/NetworkManager/dnsmasq.d/, which gets set as a dnsmasq config directory, but not in the described situation. (looking through other issues, it's most probably used in vpn setups).

i'd like to suggest (and would implement if that's the way to go) that either the existing /etc/NetworkManager/dnsmasq.d/ directory or a newly to be introduced /etc/NetworkManager/dnsmasq-shared-connections.d/ be used for additional configuration for dnsmasq in analogy to what is already implemented in dns-manager/nm-dns-dnsmasq.c.
Comment 1 Thomas Haller 2016-02-11 18:13:26 UTC
Adding a --conf-dir similar to /etc/NetworkManager/dnsmasq.d/ sounds good. But let's choose a distinct directory.

Maybe /etc/NetworkManager/dnsmasq-shared.d/ ?
Comment 2 chrysn 2016-02-11 23:14:04 UTC
ok, i'm preparing and testing a patch to that effect.
Comment 3 chrysn 2016-02-12 07:03:13 UTC
Created attachment 320933 [details] [review]
patch for including /etc/NetworkManager/dnsmasq-shared.d/

this patch applies the --conf-dir= discovery of src/dns-manager/nm-dns-dnsmasq.c to src/dnsmasq-manager/nm-dnsmasq-manager.c, and for example allows adding dhcp options required from booting via PXE.
Comment 4 Thomas Haller 2016-02-12 09:25:01 UTC
Looks good to me.


Did you actually test it that it works as expected? :)
Comment 5 chrysn 2016-02-12 10:08:20 UTC
i did, with a config file named `/etc/NetworkManager/dnsmasq-shared.d/xtux` that contains the lines `enable-tftp \ tftp-root=/tmp/lanbootserver/ \ dhcp-boot=/efi64/syslinux.efi` (abbreviated). if you want to reproduce the tests, i recommend you only use dhcp-boot, as dnsmasq refuses to start if it can't access its tftp-root (as expected, a dnsmasq error message then shows up in the nm logs).

tbh i didn't test the behavior when no such directory is prsent; i now did, and it behaves as expected.
Comment 7 Marcel Partap 2016-02-23 19:57:14 UTC
Wow this fix just went in as I ran into the problem. Glad it's been taken care of already, with me now just having renamed my dnsmasq.d dir and waiting for debian to roll another nm update :)
Comment 8 Beniamino Galvani 2016-04-12 14:08:53 UTC
*** Bug 731074 has been marked as a duplicate of this bug. ***