Skip to content

Commit

Permalink
CA-396743: fix bridge name for unmanaged devices
Browse files Browse the repository at this point in the history
There is no bridge for unmanaged devices, return the empty string instead
of a non-existent device.
Previously we would've returned 'bribft0' for the 'ibft0' interface.

Signed-off-by: Edwin Török <[email protected]>
  • Loading branch information
edwintorok committed Aug 6, 2024
1 parent 2c7bc39 commit 1adffbd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ocaml/xapi/xapi_pif.ml
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ let db_forget ~__context ~self = Db.PIF.destroy ~__context ~self
let introduce_internal ?network ?(physical = true) ~t:_ ~__context ~host ~mAC
~mTU ~device ~vLAN ~vLAN_master_of ?metrics ~managed
?(disallow_unplug = false) () =
let bridge = bridge_naming_convention device in
let bridge = if managed then bridge_naming_convention device else "" in
(* If we are not told which network to use,
* apply the default convention *)
let net_ref =
Expand Down

0 comments on commit 1adffbd

Please sign in to comment.