-
Notifications
You must be signed in to change notification settings - Fork 314
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
feat(dnsmasq): support for multiple DHCP server interfaces #4529
feat(dnsmasq): support for multiple DHCP server interfaces #4529
Conversation
...eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/dhcp/server/DnsmasqTool.java
Show resolved
Hide resolved
...eclipse.kura.linux.net/src/main/java/org/eclipse/kura/linux/net/dhcp/server/DnsmasqTool.java
Show resolved
Hide resolved
cb5d773
to
5525951
Compare
Tests missing, will add in different PR |
@marcellorinaldo The tests are failing. Can you please check? |
Forgot to update couple of test cases. |
The current tests error seem unrelated to this PR and might be solved in #4544, will rebase after that merge. |
…ions Signed-off-by: Marcello Martina <[email protected]>
…ction, manage global confs file Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
Signed-off-by: Marcello Martina <[email protected]>
3afdeae
to
d12fe49
Compare
Signed-off-by: MMaiero <[email protected]>
Merging due to the need to build RC2. @marcellorinaldo please add coverage as required https://sonarcloud.io/component_measures?id=org.eclipse.kura%3Akura&branch=PR-4529&metric=new_coverage&view=list |
* fix(dnsmasq): configs are for specific interfaces, removed global options Signed-off-by: Marcello Martina <[email protected]> * feat(linux.net.dhcp.server): addes dnsmasq more robust isRunning detection, manage global confs file Signed-off-by: Marcello Martina <[email protected]> * build(test): versions refactor Signed-off-by: Marcello Martina <[email protected]> * style: added constants Signed-off-by: Marcello Martina <[email protected]> * fix: applied review suggestions Signed-off-by: Marcello Martina <[email protected]> * fix: the router is always passed, since by default it is the localhost Signed-off-by: Marcello Martina <[email protected]> * fix: disabled option 6 when passDns=false Signed-off-by: Marcello Martina <[email protected]> * test: updated dnsmasq test case Signed-off-by: Marcello Martina <[email protected]> * fix: dhcp option key duplication Signed-off-by: MMaiero <[email protected]> --------- Signed-off-by: Marcello Martina <[email protected]> Signed-off-by: MMaiero <[email protected]> Co-authored-by: MMaiero <[email protected]> (cherry picked from commit 51bd7c2)
…release-5.3.0] (#4561) feat(dnsmasq): support for multiple DHCP server interfaces (#4529) * fix(dnsmasq): configs are for specific interfaces, removed global options Signed-off-by: Marcello Martina <[email protected]> * feat(linux.net.dhcp.server): addes dnsmasq more robust isRunning detection, manage global confs file Signed-off-by: Marcello Martina <[email protected]> * build(test): versions refactor Signed-off-by: Marcello Martina <[email protected]> * style: added constants Signed-off-by: Marcello Martina <[email protected]> * fix: applied review suggestions Signed-off-by: Marcello Martina <[email protected]> * fix: the router is always passed, since by default it is the localhost Signed-off-by: Marcello Martina <[email protected]> * fix: disabled option 6 when passDns=false Signed-off-by: Marcello Martina <[email protected]> * test: updated dnsmasq test case Signed-off-by: Marcello Martina <[email protected]> * fix: dhcp option key duplication Signed-off-by: MMaiero <[email protected]> --------- Signed-off-by: Marcello Martina <[email protected]> Signed-off-by: MMaiero <[email protected]> Co-authored-by: MMaiero <[email protected]> (cherry picked from commit 51bd7c2) Co-authored-by: Marcello Rinaldo Martina <[email protected]>
This PR writes the
dnsmasq
configuration so that each property has associated a connection label, allowing for multiple interfaces to be set as DHCP server at the same time.Related Issue: N/A.
Description of the solution adopted: The
dhcp-range
property creates a label for each activated interface. Each DHCP interface configuration is put on a file that follows the pattern:It is not allowed in dnsmasq to have global settings specified more than once across all files. Hence, a global configuration is written and maintained by the DHCP server manager. The created global configuration file is:
Screenshots: N/A.
Any side note on the changes made: Created more robust way to detect change in configuration in the method
isRunning
. It wouldn't trigger on NM configuration update.