forked from ovn-org/ovn
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
northd: fix infinite loop in ovn_allocate_tnlid()
In case if all tunnel ids are exhausted, ovn_allocate_tnlid() function iterates over tnlids indefinitely when *hint < min. This is because when tnlid reaches max, next tnlid is min and for-loop never reaches exit condition for tnlid != *hint. This patch sets a starting hint value to OVN_MIN_DP_KEY_LOCAL (1). The downside of this change is that first allocated tnlid becomes 2. This shouldn't be a problem. Signed-off-by: Vladislav Odintsov <odivlad@gmail.com>
- Loading branch information
Showing
3 changed files
with
34 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters