From 12bf4bae301e10a556e369c4f5dbeadbd47bb845 Mon Sep 17 00:00:00 2001 From: Mateusz Filipowicz Date: Thu, 20 Mar 2025 19:54:13 +0100 Subject: [PATCH] feat: support list of MAC addresses for Firewall Zone Policy (#56) --- codegen/v2/FirewallZonePolicy.json | 1 + unifi/firewall_zone_policy.generated.go | 1 + 2 files changed, 2 insertions(+) diff --git a/codegen/v2/FirewallZonePolicy.json b/codegen/v2/FirewallZonePolicy.json index 6871ae0..f911080 100644 --- a/codegen/v2/FirewallZonePolicy.json +++ b/codegen/v2/FirewallZonePolicy.json @@ -44,6 +44,7 @@ "client_macs": ["^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$"], "ip_group_id": "", "ips": ["^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$"], + "macs": ["^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$"], "mac": "^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$", "match_mac": "true|false", "match_opposite_ports": "true|false", diff --git a/unifi/firewall_zone_policy.generated.go b/unifi/firewall_zone_policy.generated.go index 6bd1ae3..725726f 100644 --- a/unifi/firewall_zone_policy.generated.go +++ b/unifi/firewall_zone_policy.generated.go @@ -132,6 +132,7 @@ type FirewallZonePolicySource struct { IPGroupID string `json:"ip_group_id,omitempty"` IPs []string `json:"ips,omitempty" validate:"omitempty,ipv4"` // ^(([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])\.){3}([0-9]|[1-9][0-9]|1[0-9]{2}|2[0-4][0-9]|25[0-5])$|^$ MAC string `json:"mac,omitempty" validate:"omitempty,mac"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$ + MACs []string `json:"macs,omitempty" validate:"omitempty,mac"` // ^([0-9A-Fa-f]{2}:){5}([0-9A-Fa-f]{2})$ MatchMAC bool `json:"match_mac"` MatchOppositeIPs bool `json:"match_opposite_ips"` MatchOppositeNetworks bool `json:"match_opposite_networks"`