Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ovn-northd: Fix update of a mac prefix.
'smap_add' doesn't check for duplicates. This leads to having more than one entry with a 'mac_prefix' key in the 'options' smap. 'ovsdb_datum_sort_unique' removes duplicates before sending the transaction. It does that by sorting values and keeping the first one per key. In normal case 'mac_prefix' transitions from nothing to random and it works fine. However, northd also tries to change all-zero prefix to random one and this fails, because all-zero prefix goes first in a sorted map and a new random value gets dropped from the transaction. This makes northd to update macs of all ports on every iteration with a new random mac prefix. Fix that by replacing smap value and not relying on IDL for removing duplicates. Fixes: 39242c1 ("northd: refactor and split some IPAM functions") Signed-off-by: Ilya Maximets <[email protected]> Acked-by: Mark D. Gray <[email protected]> Signed-off-by: Mark Michelson <[email protected]>
- Loading branch information