[ovs-dev] [PATCH ovn] ovn-nbctl: Deal with nb_cfg overflows.
Dumitru Ceara
dceara at redhat.com
Fri Aug 28 12:10:54 UTC 2020
Reported-at: https://bugzilla.redhat.com/id=1873455
Reported-by: Ying Xu <yinxu at redhat.com>
Signed-off-by: Dumitru Ceara <dceara at redhat.com>
---
utilities/ovn-nbctl.c | 5 +++++
1 file changed, 5 insertions(+)
diff --git a/utilities/ovn-nbctl.c b/utilities/ovn-nbctl.c
index d7bb4b4..542cbf7 100644
--- a/utilities/ovn-nbctl.c
+++ b/utilities/ovn-nbctl.c
@@ -6081,6 +6081,11 @@ do_nbctl(const char *args, struct ctl_command *commands, size_t n_commands,
nb = nbrec_nb_global_insert(txn);
}
+ /* Deal with potential overflows. */
+ if (nb->nb_cfg == LLONG_MAX) {
+ nbrec_nb_global_set_nb_cfg(nb, 0);
+ }
+
if (wait_type != NBCTL_WAIT_NONE) {
ovsdb_idl_txn_increment(txn, &nb->header_, &nbrec_nb_global_col_nb_cfg,
force_wait);
--
1.8.3.1
More information about the dev
mailing list