- Notifications
You must be signed in to change notification settings - Fork5
Commit52d39d5
committed
Sorting for the inet data type randomly returns the wrong result
when you have networks with the same prefix, but different netmasks.This is due to the fact that occassionally there is random(uninitialized?)data in the extra bits past the point where the netmask cares aboutthem.ie (real data from a real live database): 10.0/10 == 00001010.00100000.00100000.00011000 10.0/11 == 00001010.00000000.00000000.00000000 ^ Bad data, normally never seenThe v4bitncmp() function was only taking one bit length argument soit would determine that the networks were different, even thoughthey really aren't (and the netmask test wouldn't be used). ThisONLY happens if the tuple with the longer bit length is used as theip_bits() for the v4bitncmp call AND there happens to be junk datain place in the shorter tuple. Odd and random, but I saw it happena couple times so...Ryan Mooney1 parent5a19781 commit52d39d5
1 file changed
+14
-11
lines changedLines changed: 14 additions & 11 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3 | 3 |
| |
4 | 4 |
| |
5 | 5 |
| |
6 |
| - | |
| 6 | + | |
7 | 7 |
| |
8 | 8 |
| |
9 | 9 |
| |
| |||
18 | 18 |
| |
19 | 19 |
| |
20 | 20 |
| |
21 |
| - | |
| 21 | + | |
22 | 22 |
| |
23 | 23 |
| |
24 | 24 |
| |
| |||
137 | 137 |
| |
138 | 138 |
| |
139 | 139 |
| |
140 |
| - | |
| 140 | + | |
141 | 141 |
| |
142 | 142 |
| |
143 | 143 |
| |
| |||
166 | 166 |
| |
167 | 167 |
| |
168 | 168 |
| |
169 |
| - | |
| 169 | + | |
170 | 170 |
| |
171 | 171 |
| |
172 | 172 |
| |
| |||
192 | 192 |
| |
193 | 193 |
| |
194 | 194 |
| |
195 |
| - | |
| 195 | + | |
196 | 196 |
| |
197 | 197 |
| |
198 | 198 |
| |
| |||
222 | 222 |
| |
223 | 223 |
| |
224 | 224 |
| |
225 |
| - | |
| 225 | + | |
226 | 226 |
| |
227 | 227 |
| |
228 | 228 |
| |
| |||
242 | 242 |
| |
243 | 243 |
| |
244 | 244 |
| |
245 |
| - | |
| 245 | + | |
246 | 246 |
| |
247 | 247 |
| |
248 | 248 |
| |
| |||
262 | 262 |
| |
263 | 263 |
| |
264 | 264 |
| |
265 |
| - | |
| 265 | + | |
266 | 266 |
| |
267 | 267 |
| |
268 | 268 |
| |
| |||
282 | 282 |
| |
283 | 283 |
| |
284 | 284 |
| |
285 |
| - | |
| 285 | + | |
286 | 286 |
| |
287 | 287 |
| |
288 | 288 |
| |
| |||
476 | 476 |
| |
477 | 477 |
| |
478 | 478 |
| |
479 |
| - | |
| 479 | + | |
480 | 480 |
| |
481 | 481 |
| |
482 |
| - | |
| 482 | + | |
| 483 | + | |
| 484 | + | |
483 | 485 |
| |
484 | 486 |
| |
485 | 487 |
| |
| 488 | + | |
486 | 489 |
| |
487 | 490 |
| |
488 | 491 |
| |
|
0 commit comments
Comments
(0)