@@ -224,6 +224,7 @@ fn ip_properties() {
224
224
let global: u8 = 1 << 2 ;
225
225
let multicast: u8 = 1 << 3 ;
226
226
let doc: u8 = 1 << 4 ;
227
+ let benchmarking: u8 = 1 << 5 ;
227
228
228
229
if ( $mask & unspec) == unspec {
229
230
assert!( ip!( $s) . is_unspecified( ) ) ;
@@ -254,6 +255,12 @@ fn ip_properties() {
254
255
} else {
255
256
assert!( !ip!( $s) . is_documentation( ) ) ;
256
257
}
258
+
259
+ if ( $mask & benchmarking) == benchmarking {
260
+ assert!( ip!( $s) . is_benchmarking( ) ) ;
261
+ } else {
262
+ assert!( !ip!( $s) . is_benchmarking( ) ) ;
263
+ }
257
264
} } ;
258
265
}
259
266
@@ -262,6 +269,7 @@ fn ip_properties() {
262
269
let global: u8 = 1 << 2 ;
263
270
let multicast: u8 = 1 << 3 ;
264
271
let doc: u8 = 1 << 4 ;
272
+ let benchmarking: u8 = 1 << 5 ;
265
273
266
274
check ! ( "0.0.0.0" , unspec) ;
267
275
check ! ( "0.0.0.1" ) ;
@@ -280,9 +288,9 @@ fn ip_properties() {
280
288
check ! ( "239.255.255.255" , global | multicast) ;
281
289
check ! ( "255.255.255.255" ) ;
282
290
// make sure benchmarking addresses are not global
283
- check ! ( "198.18.0.0" ) ;
284
- check ! ( "198.18.54.2" ) ;
285
- check ! ( "198.19.255.255" ) ;
291
+ check ! ( "198.18.0.0" , benchmarking ) ;
292
+ check ! ( "198.18.54.2" , benchmarking ) ;
293
+ check ! ( "198.19.255.255" , benchmarking ) ;
286
294
// make sure addresses reserved for protocol assignment are not global
287
295
check ! ( "192.0.0.0" ) ;
288
296
check ! ( "192.0.0.255" ) ;
@@ -313,6 +321,7 @@ fn ip_properties() {
313
321
check ! ( "ff08::" , multicast) ;
314
322
check ! ( "ff0e::" , global | multicast) ;
315
323
check ! ( "2001:db8:85a3::8a2e:370:7334" , doc) ;
324
+ check ! ( "2001:2::ac32:23ff:21" , global | benchmarking) ;
316
325
check ! ( "102:304:506:708:90a:b0c:d0e:f10" , global) ;
317
326
}
318
327
0 commit comments