[PR #4413] fix: improve bridge detection in all network interface configuration files #4951

Closed
opened 2025-11-20 06:12:28 -05:00 by saavagebueno · 0 comments
Owner

Original Pull Request: https://github.com/community-scripts/ProxmoxVE/pull/4413

State: closed
Merged: Yes


✍️ Description

This pull request provides a more robust and comprehensive solution to the bridge detection issue, replacing the previous attempt that proved insufficient.

The new implementation:

  • Uses a more sophisticated parsing method to analyze entire interface configuration blocks
  • Processes both the main /etc/network/interfaces file and all files in interfaces.d/ directory
  • Detects bridges based on bridge-related parameters regardless of naming convention
  • Handles both hyphenated (bridge-ports) and underscore (bridge_ports) syntax variations
  • Works with SDN (Software-Defined Networking) configurations

Unlike the previous fix attempt, this solution has been tested with various network configurations and correctly identifies bridge interfaces regardless of their naming patterns. The script includes detailed comments for better maintainability and future enhancements.

This PR replaces PR #4351 addresses the issue reported in #4360 (and in #4351 too) and should also work for #4354.

Prerequisites (X in brackets)

  • Self-review completed – Code follows project standards.
  • Tested thoroughly – Changes work as expected.
  • No security risks – No hardcoded secrets, unnecessary privilege escalations, or permission issues.

🛠️ Type of Change (X in brackets)

  • 🐞 Bug fix – Resolves an issue without breaking functionality.
  • New feature – Adds new, non-breaking functionality.
  • 💥 Breaking change – Alters existing functionality in a way that may require updates.
  • 🆕 New script – A fully functional and tested script or script set.
  • 🌍 Website update – Changes to website-related JSON files or metadata.
  • 🔧 Refactoring / Code Cleanup – Improves readability or maintainability without changing functionality.
  • 📝 Documentation update – Changes to README, AppName.md, CONTRIBUTING.md, or other docs.
**Original Pull Request:** https://github.com/community-scripts/ProxmoxVE/pull/4413 **State:** closed **Merged:** Yes --- ## ✍️ Description This pull request provides a more robust and comprehensive solution to the bridge detection issue, replacing the previous attempt that proved insufficient. The new implementation: - Uses a more sophisticated parsing method to analyze entire interface configuration blocks - Processes both the main /etc/network/interfaces file and all files in interfaces.d/ directory - Detects bridges based on bridge-related parameters regardless of naming convention - Handles both hyphenated (bridge-ports) and underscore (bridge_ports) syntax variations - Works with SDN (Software-Defined Networking) configurations Unlike the previous fix attempt, this solution has been tested with various network configurations and correctly identifies bridge interfaces regardless of their naming patterns. The script includes detailed comments for better maintainability and future enhancements. This PR replaces PR #4351 addresses the issue reported in #4360 (and in #4351 too) and should also work for #4354. ## ✅ Prerequisites (**X** in brackets) - [X] **Self-review completed** – Code follows project standards. - [X] **Tested thoroughly** – Changes work as expected. - [X] **No security risks** – No hardcoded secrets, unnecessary privilege escalations, or permission issues. --- ## 🛠️ Type of Change (**X** in brackets) - [X] 🐞 **Bug fix** – Resolves an issue without breaking functionality. - [ ] ✨ **New feature** – Adds new, non-breaking functionality. - [ ] 💥 **Breaking change** – Alters existing functionality in a way that may require updates. - [ ] 🆕 **New script** – A fully functional and tested script or script set. - [ ] 🌍 **Website update** – Changes to website-related JSON files or metadata. - [ ] 🔧 **Refactoring / Code Cleanup** – Improves readability or maintainability without changing functionality. - [ ] 📝 **Documentation update** – Changes to `README`, `AppName.md`, `CONTRIBUTING.md`, or other docs.
saavagebueno added the pull-request label 2025-11-20 06:12:28 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: SVI/ProxmoxVE#4951