Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
firewall: Add empty slices for respective direction instead of nil-sl…
…ices As reported in #320, firewall rules can not be deleted because they would not exist even if they are shown in "firewall describe". This behaviour was correct because reflect.DeepEqual also compares if a slice is empty or nil. The slices DestinationIPs and SourceIPs are empty slices in an existing firewall rule. However, the temporary FirewallRule object had slices that were nil. To fix this problem, the simple solution is to create an empty IPNet slice for the respective direction (DestinationIPs for the direction "in", and SourceIPs for the direction "out"). Signed-off-by: Tom Siewert <[email protected]>
- Loading branch information