-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Allocates guest MAC addresses via a next item query
- Provides random base address within the guest-visible range of A8:40:25:F0:00:00-A8:40:25:FE:FF:FF. - Switch the database representation of MAC addresses in the `network_interface` table from a string to INT8. The string representation is human-readable, but doesn't allow any other operations on it (such as addition). There's also no native MACADDR support in CRDB, so we don't lose much by switching to a new repr. Any client code needs to parse/interpret the value anyway, and a byte-representation in some ways is more natural or obvious. - Adds a NextItem query for generating a random guest MAC address. This is the upshot of the change to an integer, that we can add to it and thus use the NextItem query machinery. - Adds a variant of the `NetworkInterfaceError` for detecting MAC address exhaustion.
- Loading branch information
Showing
7 changed files
with
135 additions
and
60 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
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
Oops, something went wrong.