From e44b402fe461b4bb90115b3751ee0ea39aa9952b Mon Sep 17 00:00:00 2001 From: Kristoffer Dalby Date: Tue, 3 Feb 2026 09:01:30 +0000 Subject: [PATCH] integration: update TestSubnetRouteACL for filter merging and IPProto Update integration test expectations to match current policy behavior: 1. IPProto defaults include all four protocols (TCP, UDP, ICMPv4, ICMPv6) for port-range ACL rules, not just TCP and UDP. 2. Filter rules with identical SrcIPs and IPProto are now merged into a single rule with combined DstPorts, so the subnet router receives one filter rule instead of two. Updates #3036 --- integration/route_test.go | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/integration/route_test.go b/integration/route_test.go index 0460b5ef..828dc003 100644 --- a/integration/route_test.go +++ b/integration/route_test.go @@ -1473,7 +1473,7 @@ func TestSubnetRouteACL(t *testing.T) { wantClientFilter := []filter.Match{ { IPProto: views.SliceOf([]ipproto.Proto{ - ipproto.TCP, ipproto.UDP, + ipproto.TCP, ipproto.UDP, ipproto.ICMPv4, ipproto.ICMPv6, }), Srcs: []netip.Prefix{ netip.MustParsePrefix("100.64.0.1/32"), @@ -1505,10 +1505,12 @@ func TestSubnetRouteACL(t *testing.T) { }, 10*time.Second, 200*time.Millisecond, "Waiting for client packet filter to update") // Wait for packet filter updates to propagate to subnet router netmap + // The two ACL rules (group:admins -> group:admins:* and group:admins -> 10.33.0.0/16:*) + // are merged into one filter rule since they share the same SrcIPs and IPProto. wantSubnetFilter := []filter.Match{ { IPProto: views.SliceOf([]ipproto.Proto{ - ipproto.TCP, ipproto.UDP, + ipproto.TCP, ipproto.UDP, ipproto.ICMPv4, ipproto.ICMPv6, }), Srcs: []netip.Prefix{ netip.MustParsePrefix("100.64.0.1/32"), @@ -1525,20 +1527,6 @@ func TestSubnetRouteACL(t *testing.T) { Net: netip.MustParsePrefix("fd7a:115c:a1e0::1/128"), Ports: allPorts, }, - }, - Caps: []filter.CapMatch{}, - }, - { - IPProto: views.SliceOf([]ipproto.Proto{ - ipproto.TCP, ipproto.UDP, - }), - Srcs: []netip.Prefix{ - netip.MustParsePrefix("100.64.0.1/32"), - netip.MustParsePrefix("100.64.0.2/32"), - netip.MustParsePrefix("fd7a:115c:a1e0::1/128"), - netip.MustParsePrefix("fd7a:115c:a1e0::2/128"), - }, - Dsts: []filter.NetPortRange{ { Net: netip.MustParsePrefix("10.33.0.0/16"), Ports: allPorts,