Project

General

Profile

« Previous | Next » 

Revision 4d7be139

Added by Marcos M 8 months ago

Define additional system aliases. Implement #15776

View differences:

src/etc/inc/globals.inc
342 342
	],
343 343
];
344 344

  
345
function add_reserved_table(array $table, array $values) {
346
	global $reserved_table_names;
347
	if (!array_key_exists('name', $table)) {
348
		return;
349
	}
350
	$table['address'] = implode(' ', array_keys($values));
351
	$table['detail'] = implode('||', array_values($values));
352
	$reserved_table_names[$table['name']] = $table;
353
}
354

  
355
add_reserved_table(
356
	[
357
		'name' => '_loopback_',
358
		'type' => 'network',
359
		'descr' => 'IPv4 and IPv6 loopback networks.',
360
	],
361
	[
362
		'127.0.0.0/8' => 'Loopback', // RFC1122
363
		'::1/128' => 'Loopback Address', // RFC4291
364
	],
365
);
366
add_reserved_table(
367
	[
368
		'name' => '_linklocal4_',
369
		'type' => 'network',
370
		'descr' => 'IPv4 link-local networks.',
371
	],
372
	[
373
		'169.254.0.0/16' => 'Link Local', // RFC3927
374
	],
375
);
376
add_reserved_table(
377
	[
378
		'name' => '_linklocal6_',
379
		'type' => 'network',
380
		'descr' => 'IPv6 link-local networks.',
381
	],
382
	[
383
		'fe80::/10' => 'Linked-Scoped Unicast', // RFC4291
384
	],
385
);
386
add_reserved_table(
387
	[
388
		'name' => '_private4_',
389
		'type' => 'network',
390
		'descr' => 'IPv4 private networks.',
391
	],
392
	[
393
		'10.0.0.0/8' => 'Private-Use', // RFC1918
394
		'172.16.0.0/12' => 'Private-Use', // RFC1918
395
		'192.168.0.0/16' => 'Private-Use', // RFC1918
396

  
397
	],
398
);
399
add_reserved_table(
400
	[
401
		'name' => '_private6_',
402
		'type' => 'network',
403
		'descr' => 'IPv6 private networks.',
404
	],
405
	[
406
		'fc00::/7' => 'Unique-Local', // RFC4193
407
	],
408
);
409
add_reserved_table(
410
	[
411
		'name' => '_multicast4_',
412
		'type' => 'network',
413
		'descr' => 'IPv4 multicast networks.',
414
	],
415
	[
416
		'224.0.0.0/4' => 'Multicast', // RFC5771
417
	],
418
);
419
add_reserved_table(
420
	[
421
		'name' => '_multicast6_',
422
		'type' => 'network',
423
		'descr' => 'IPv6 multicast networks.',
424
	],
425
	[
426
		'ff00::/8' => 'Multicast', // RFC4291
427
	],
428
);
429
add_reserved_table(
430
	[
431
		'name' => '_reserved4_',
432
		'type' => 'network',
433
		'descr' => 'IPv4 networks reserved for local use.',
434
	],
435
	[
436
		'0.0.0.0/8' => 'This host on this network', // RFC1122
437
		'10.0.0.0/8' => 'Private-Use', // RFC1918
438
		'100.64.0.0/10' => 'Shared Address Space', // RFC6598
439
		'127.0.0.0/8' => 'Loopback', // RFC1122
440
		'169.254.0.0/16' => 'Link Local', // RFC3927
441
		'172.16.0.0/12' => 'Private-Use', // RFC1918
442
		'192.0.0.0/24' => 'IETF Protocol Assignments', // RFC6890
443
		'192.0.2.0/24' => 'Documentation (TEST-NET-1)', // RFC5737
444
		'192.88.99.0/24' => '6to4 Relay Anycast', // RFC3068
445
		'192.168.0.0/16' => 'Private-Use', // RFC1918
446
		'198.18.0.0/15' => 'Benchmarking', //RFC2544
447
		'198.51.100.0/24' => 'Documentation (TEST-NET-2)', // RFC5737
448
		'203.0.113.0/24' => 'Documentation (TEST-NET-3)', // RFC5737
449
		'224.0.0.0/4' => 'Multicast', // RFC5771
450
		'240.0.0.0/4' => 'Reserved', // RFC1112
451
		'255.255.255.255/32' => 'Limited Broadcast', // RFC0919
452
	]
453
);
454
add_reserved_table(
455
	[
456
		'name' => '_reserved6_',
457
		'type' => 'network',
458
		'descr' => 'IPv6 networks reserved for local use.',
459
	],
460
	[
461
		'::1/128' => 'Loopback Address', // RFC4291
462
		'::/128' => 'Unspecified Address', // RFC4291
463
		'::ffff:0:0/96' => 'IPv4-mapped Address', // RFC4291
464
		'64:ff9b::/96' => 'IPv4-IPv6 Translation', // RFC6052
465
		'64:ff9b:1::/48' => 'Local-Use IPv4/IPv6 Translation', // RFC8215
466
		'100::/64' => 'Discard-Only Address Block', // RFC6666
467
		'2001::/23' => 'IETF Protocol Assignments', // RFC2928
468
		'2001:2::/48' => 'Benchmarking', // RFC5180
469
		'2001:db8::/32' => 'Documentation', // RFC3849
470
		'2002::/16' => '6to4', // RFC3056
471
		'3fff::/20' => 'Documentation', // RFC9637
472
		'5f00::/16' => 'Segment Routing (SRv6) SIDs', // RFC9602
473
		'fc00::/7' => 'Unique-Local', // RFC4193
474
		'fe80::/10' => 'Linked-Scoped Unicast', // RFC4291
475
		'ff00::/8' => 'Multicast', // RFC4291
476
	]
477
);
478

  
345 479
/* VLAN Prio values. */
346 480
global $vlanprio_values;
347 481
$vlanprio_values = [

Also available in: Unified diff