@@ -500,10 +500,10 @@ async fn test_internal_ipv6_validation() {
500
500
501
501
let ( port_id, link_id) = switch. link_id ( PhysPort ( 26 ) ) . unwrap ( ) ;
502
502
503
- // Test 1: IPv4 groups should be rejected from internal API
504
- let ipv4_internal = types:: MulticastGroupCreateEntry {
505
- group_ip : "::ffff:224.1.1.1" . parse ( ) . unwrap ( ) , // IPv4-mapped IPv6 to test rejection
506
- tag : Some ( "test_ipv4_internal " . to_string ( ) ) ,
503
+ // Test 1: IPv4-mapped IPv6 addresses should be rejected as invalid multicast
504
+ let ipv4_mapped_internal = types:: MulticastGroupCreateEntry {
505
+ group_ip : "::ffff:224.1.1.1" . parse ( ) . unwrap ( ) , // IPv4-mapped IPv6
506
+ tag : Some ( "test_ipv4_mapped_internal " . to_string ( ) ) ,
507
507
sources : None ,
508
508
members : vec ! [ types:: MulticastGroupMember {
509
509
port_id: port_id. clone( ) ,
@@ -512,18 +512,17 @@ async fn test_internal_ipv6_validation() {
512
512
} ] ,
513
513
} ;
514
514
515
- let ipv4_res = switch. client . multicast_group_create ( & ipv4_internal ) . await ;
515
+ let ipv4_mapped_res = switch. client . multicast_group_create ( & ipv4_mapped_internal ) . await ;
516
516
517
517
assert ! (
518
- ipv4_res . is_err( ) ,
519
- "Should reject IPv4 groups from internal API "
518
+ ipv4_mapped_res . is_err( ) ,
519
+ "Should reject IPv4-mapped IPv6 addresses "
520
520
) ;
521
- let ipv4_error_msg = format ! ( "{:?}" , ipv4_res . unwrap_err( ) ) ;
521
+ let ipv4_mapped_error_msg = format ! ( "{:?}" , ipv4_mapped_res . unwrap_err( ) ) ;
522
522
assert ! (
523
- ipv4_error_msg
524
- . contains( "IPv4 multicast groups must use the external API" ) ,
525
- "Error message should direct to external API: {}" ,
526
- ipv4_error_msg
523
+ ipv4_mapped_error_msg. contains( "is not a multicast address" ) ,
524
+ "Error message should indicate invalid multicast address: {}" ,
525
+ ipv4_mapped_error_msg
527
526
) ;
528
527
529
528
// Test 2: Non-admin-scoped IPv6 groups should be rejected from internal API
@@ -3584,7 +3583,6 @@ async fn test_multicast_reset_all_tables() -> TestResult {
3584
3583
. await ;
3585
3584
3586
3585
// 2b. Admin-scoped IPv6 group to test internal API with custom replication parameters
3587
- let admin_scoped_ip = IpAddr :: V6 ( Ipv6Addr :: new ( 0xff04 , 0 , 0 , 0 , 0 , 0 , 0 , 2 ) ) ;
3588
3586
let group_entry2b = types:: MulticastGroupCreateEntry {
3589
3587
group_ip : Ipv6Addr :: new ( 0xff04 , 0 , 0 , 0 , 0 , 0 , 0 , 2 ) ,
3590
3588
tag : Some ( "test_reset_all_2b" . to_string ( ) ) ,
@@ -4150,8 +4148,6 @@ async fn test_multicast_level1_exclusion_group_pruned() -> TestResult {
4150
4148
let egress1 = PhysPort ( 15 ) ;
4151
4149
let egress2 = PhysPort ( 22 ) ;
4152
4150
4153
- let egress2_asic_id = switch. tofino_port ( egress2) ;
4154
-
4155
4151
let src_mac = switch. get_port_mac ( ingress) . unwrap ( ) ;
4156
4152
4157
4153
let multicast_ip = IpAddr :: V4 ( MULTICAST_TEST_IPV4 ) ;
0 commit comments