Skip to content

Conversation

levkropp
Copy link
Contributor

@levkropp levkropp commented Oct 9, 2025

This pull request introduces a new strategy for generating bridge names in the Linux backend to ensure uniqueness when interface names are long by truncating long interface names and appending a short hash. This ensures that bridge names are both readable and unique.

  • Updated the bridge creation logic in create_bridge_with to use the new generate_bridge_name function, replacing the previous simple truncation method.
  • Added QCryptographicHash includes to both backend_utils.cpp and test_backend_utils.cpp to support the new hashing logic for bridge name generation.

Originally:

  • eth123456789abcbr-eth123456789 (truncated to 15 chars)
  • eth123456789xyzbr-eth123456789 (same name - collision)

With the fix:

  • eth123456789abcbr-eth12345-8f9 (unique hash suffix)
  • eth123456789xyzbr-eth12345-a2c (different hash - no collision)

Short names (unchanged, fully readable):

  • eth0br-eth0
  • wlan0br-wlan0
  • enp0s3br-enp0s3

resolves #2158

@levkropp levkropp force-pushed the injective-bridge-names branch from 5c52c7d to a6bb1bd Compare October 9, 2025 17:02
Copy link

codecov bot commented Oct 9, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.39%. Comparing base (96a02d6) to head (4a070df).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #4422   +/-   ##
=======================================
  Coverage   89.39%   89.39%           
=======================================
  Files         253      253           
  Lines       16457    16468   +11     
=======================================
+ Hits        14711    14722   +11     
  Misses       1746     1746           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@levkropp levkropp force-pushed the injective-bridge-names branch from a6bb1bd to 5e437ad Compare October 15, 2025 19:49
@levkropp levkropp force-pushed the injective-bridge-names branch from 5e437ad to 4a070df Compare October 16, 2025 13:36
@levkropp levkropp marked this pull request as ready for review October 16, 2025 14:10
@levkropp levkropp requested a review from ricab October 16, 2025 14:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Mapping of interface name to bridge name not injective

1 participant