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

Avoid CivetWeb crash if no optional port could be bound #2313

Merged
merged 2 commits into from
Mar 3, 2025

Conversation

DL6ER
Copy link
Member

@DL6ER DL6ER commented Mar 1, 2025

What does this implement/fix?

Do not try to start API if no ports succeeded binding. This circumvents a bug resulting in a crash in CivetWeb. See upstream issue report at civetweb/civetweb#1327

Should be merged after #2312 as it is based on it to know when we bound to ports (and when not).


Related issue or feature (if applicable): Fixes #2250

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 DL6ER requested a review from a team March 1, 2025 10:32
@DL6ER DL6ER changed the title Fix/civetweb all ports optional Avoid CivetWeb crash if no optional port could be bound Mar 1, 2025
@DL6ER
Copy link
Member Author

DL6ER commented Mar 1, 2025

Submitted upstream as civetweb/civetweb#1328. This PR is equivalent and should be merged to our codebase when the bugfix is accepted as-is upstream.

@DL6ER DL6ER mentioned this pull request Mar 1, 2025
5 tasks
@DL6ER
Copy link
Member Author

DL6ER commented Mar 1, 2025

Confirmed by OP in #2250 (comment)

PromoFaux
PromoFaux previously approved these changes Mar 2, 2025
Copy link
Member

@PromoFaux PromoFaux left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving based on OPs confirmation

@DL6ER DL6ER dismissed PromoFaux’s stale review March 2, 2025 18:15

The merge-base changed after approval.

@DL6ER DL6ER force-pushed the fix/civetweb_all_ports_optional branch from 4cd2fce to 51caf0a Compare March 2, 2025 20:34
@DL6ER DL6ER requested a review from PromoFaux March 2, 2025 20:34
@DL6ER
Copy link
Member Author

DL6ER commented Mar 2, 2025

Rebased on latest development as the review was anyway "gone" after I had merged other PRs. The dismissal seems to have happened automatically because the PR where this was based on was merged before.

@DL6ER DL6ER merged commit d3aa3d6 into development Mar 3, 2025
19 checks passed
@DL6ER DL6ER deleted the fix/civetweb_all_ports_optional branch March 3, 2025 05:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants