diff --git a/management/server/types/firewall_rule.go b/management/server/types/firewall_rule.go index 118a6a3d2..10923828d 100644 --- a/management/server/types/firewall_rule.go +++ b/management/server/types/firewall_rule.go @@ -3,6 +3,7 @@ package types import ( "context" "fmt" + "reflect" "strconv" "strings" @@ -40,11 +41,7 @@ type FirewallRule struct { // Equal checks if two firewall rules are equal. func (r *FirewallRule) Equal(other *FirewallRule) bool { - return r.PeerIP == other.PeerIP && - r.Direction == other.Direction && - r.Action == other.Action && - r.Protocol == other.Protocol && - r.Port == other.Port + return reflect.DeepEqual(r, other) } // generateRouteFirewallRules generates a list of firewall rules for a given route.