Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion ocaml/xapi/xapi_host.ml
Original file line number Diff line number Diff line change
Expand Up @@ -2527,7 +2527,12 @@ let migrate_receive ~__context ~host ~network ~options:_ =
let configuration_mode =
Db.PIF.get_ipv6_configuration_mode ~__context ~self:pif
in
match Db.PIF.get_IPv6 ~__context ~self:pif with
let valid_ipv6s =
List.filter
(fun ipv6 -> not (String.starts_with ~prefix:"fe80::" ipv6))
(Db.PIF.get_IPv6 ~__context ~self:pif)
in
match valid_ipv6s with
| [] ->
("", configuration_mode)
| ip :: _ ->
Expand Down
7 changes: 6 additions & 1 deletion ocaml/xapi/xapi_pif_helpers.ml
Original file line number Diff line number Diff line change
Expand Up @@ -262,4 +262,9 @@ let get_primary_address ~__context ~pif =
match Db.PIF.get_IP ~__context ~self:pif with "" -> None | ip -> Some ip
)
| `IPv6 ->
List.nth_opt (Db.PIF.get_IPv6 ~__context ~self:pif) 0
let valid_ipv6s =
List.filter
(fun ipv6 -> not (String.starts_with ~prefix:"fe80::" ipv6))
(Db.PIF.get_IPv6 ~__context ~self:pif)
in
List.nth_opt valid_ipv6s 0