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

Tweak dhcp-discover subcommand #1562

Merged
merged 8 commits into from May 22, 2023
Merged

Tweak dhcp-discover subcommand #1562

merged 8 commits into from May 22, 2023

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented May 21, 2023

What does this implement/fix?

This PR improves the dhcp-discover feature in three ways:

  1. We add locking between the log outputs to ensure only once thread can "talk" at a time to reduce the possibility of intermixing texts for DHCP replies receiving at the same time
  2. Add explicit logging for when the call to sendto() fails (as has been suggested in a comment of @yubiuser in Add capabilities check for feature dhcp-discover #1561)
  3. Scan all IPv4-capable interfaces. So far, the scan looped over packet-capable interfaces. The list of interfaces overlaps, but is not identical. Looping over AF_INET interfaces is more appropriate because we want to make sure they can actually send IPv4 UDP packets to a potential DHCP server.

Furthermore, this PR fixes a small bug in our deployment script that incorrectly assumed some directories already existed when they really don't, ultimately leading to a deployment fail.

Related issue or feature (if applicable): N/A

Pull request in docs with documentation (if applicable): N/A


By submitting this pull request, I confirm the following:

  1. I have read and understood the contributors guide, as well as this entire template. I understand which branch to base my commits and Pull Requests against.
  2. I have commented my proposed changes within the code.
  3. I am willing to help maintain this change if there are issues with it later.
  4. It is compatible with the EUPL 1.2 license
  5. I have squashed any insignificant commits. (git rebase)

Checklist:

  • The code change is tested and works locally.
  • I based my code and PRs against the repositories developmental branch.
  • I signed off all commits. Pi-hole enforces the DCO for all contributions
  • I signed all my commits. Pi-hole requires signatures to verify authorship
  • I have read the above and my PR is ready for review.

DL6ER added 3 commits May 20, 2023 22:19
… is prevented and add better error reporting when sending to interfaces is not working due to an error

Signed-off-by: DL6ER <dl6er@dl6er.de>
…ing for DHCP servers

Signed-off-by: DL6ER <dl6er@dl6er.de>
…gex-matching the searched string against the entire collapsed array to avoid incorrect partial matches

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER added the Bugfix label May 21, 2023
@DL6ER DL6ER requested a review from a team May 21, 2023 07:52
DL6ER added 5 commits May 21, 2023 10:06
Signed-off-by: DL6ER <dl6er@dl6er.de>
… that there is no broadcasting support (e.g. Wireguard)

Signed-off-by: DL6ER <dl6er@dl6er.de>
…ot supported (e.g. Wireguard)

Signed-off-by: DL6ER <dl6er@dl6er.de>
@DL6ER DL6ER merged commit c2bdc24 into development May 22, 2023
20 checks passed
@DL6ER DL6ER deleted the tweak/dhcp-discover branch May 22, 2023 15:04
@DL6ER DL6ER mentioned this pull request May 28, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants