fix(xo-server/PIF): IPv4 reconfiguration only worked when mode was updated (#7324)

This commit is contained in:
Mathieu 2024-01-23 10:55:37 +01:00 committed by GitHub
parent 25e270edb4
commit 2b1562da81
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 8 additions and 1 deletions

View File

@ -37,6 +37,7 @@
- [Modal] Fix opened modal not closing when navigating to another route/URL (PR [#7301](https://github.com/vatesfr/xen-orchestra/pull/7301))
- [Backup/Restore] Don't count memory as a key (i.e. complete) disk [Forum#8212](https://xcp-ng.org/forum/post/69591) (PR [#7315](https://github.com/vatesfr/xen-orchestra/pull/7315))
- [Pool/patches] Disable Rolling Pool Update button if host is alone in its pool [#6415](https://github.com/vatesfr/xen-orchestra/issues/6415) (PR [#7286](https://github.com/vatesfr/xen-orchestra/pull/7286))
- [PIF] Fix IPv4 reconfiguration only worked when the IPv4 mode was updated (PR [#7324](https://github.com/vatesfr/xen-orchestra/pull/7324))
### Packages to release

View File

@ -90,7 +90,13 @@ export async function reconfigureIp({ pif, mode, ip = '', netmask = '', gateway
)
}
if (mode !== undefined && mode !== pif.mode) {
if (
(mode !== undefined && mode !== pif.mode) ||
ip !== pif.ip ||
netmask !== pif.netmask ||
gateway !== pif.gateway ||
dns !== pif.dns
) {
await Task.run(
{ properties: { name: 'reconfigure IPv4', mode, ip, netmask, gateway, dns, objectId: pif.uuid } },
() => xapi.call('PIF.reconfigure_ip', pif._xapiRef, mode, ip, netmask, gateway, dns)