Commit eef54c7
BUGFIX: Fix VM MAC generation
The old code used `hex` to convert some random bytes to hex. The `hex` command throws away leading zeros, resulting in MAC addresses that were too short.
This code swaps that out for `secrets.hex_token` which will always return the correct number of characters.1 parent 3644258 commit eef54c7
1 file changed
Lines changed: 6 additions & 5 deletions
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
6 | 6 | | |
7 | 7 | | |
8 | 8 | | |
| 9 | + | |
9 | 10 | | |
10 | 11 | | |
11 | 12 | | |
12 | 13 | | |
13 | 14 | | |
| 15 | + | |
| 16 | + | |
14 | 17 | | |
15 | 18 | | |
16 | 19 | | |
| |||
149 | 152 | | |
150 | 153 | | |
151 | 154 | | |
152 | | - | |
153 | | - | |
| 155 | + | |
154 | 156 | | |
155 | 157 | | |
156 | | - | |
157 | | - | |
158 | | - | |
| 158 | + | |
| 159 | + | |
159 | 160 | | |
160 | 161 | | |
161 | 162 | | |
| |||
0 commit comments