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

Closed
opened 2026-02-26 14:32:17 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/community-scripts/ProxmoxVE/pull/4413
Author: @filippolauria
Created: 5/12/2025
Status: Merged
Merged: 5/13/2025
Merged by: @MickLesk

Base: mainHead: main


📝 Commits (3)

  • 4ad7119 fix: improve bridge detection in all network interface configuration files
  • 20bfa61 removed comments
  • 60b157e removed last comment line

📊 Changes

1 file changed (+32 additions, -2 deletions)

View changed files

📝 misc/build.func (+32 -2)

📄 Description

✍️ 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.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/community-scripts/ProxmoxVE/pull/4413 **Author:** [@filippolauria](https://github.com/filippolauria) **Created:** 5/12/2025 **Status:** ✅ Merged **Merged:** 5/13/2025 **Merged by:** [@MickLesk](https://github.com/MickLesk) **Base:** `main` ← **Head:** `main` --- ### 📝 Commits (3) - [`4ad7119`](https://github.com/community-scripts/ProxmoxVE/commit/4ad71196262bd8fead698e8fb0ce718c0407e166) fix: improve bridge detection in all network interface configuration files - [`20bfa61`](https://github.com/community-scripts/ProxmoxVE/commit/20bfa61dcfa770e72b53a2c3d2ad21b38336df06) removed comments - [`60b157e`](https://github.com/community-scripts/ProxmoxVE/commit/60b157ed823432194941a86e38164a5aca47d6bc) removed last comment line ### 📊 Changes **1 file changed** (+32 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `misc/build.func` (+32 -2) </details> ### 📄 Description ## ✍️ 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. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-02-26 14:32:17 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/ProxmoxVE#4854
No description provided.