From 1adffbd62673f2df3be45d026f963ed8f058dc97 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edwin=20T=C3=B6r=C3=B6k?= Date: Tue, 6 Aug 2024 16:35:20 +0100 Subject: [PATCH] CA-396743: fix bridge name for unmanaged devices MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- ocaml/xapi/xapi_pif.ml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ocaml/xapi/xapi_pif.ml b/ocaml/xapi/xapi_pif.ml index baaef68714d..b6067a509de 100644 --- a/ocaml/xapi/xapi_pif.ml +++ b/ocaml/xapi/xapi_pif.ml @@ -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 =