From 8ee5c3dfea3d4e4c80a6f9c1ce695a77d1c21280 Mon Sep 17 00:00:00 2001 From: Ghanan Gowripalan Date: Tue, 30 May 2023 15:45:48 -0700 Subject: [PATCH] Introduce AddressMask.Equals ...for use by the cmp library. PiperOrigin-RevId: 536530206 --- pkg/tcpip/tcpip.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go index f0fbe83ac..1af4685af 100644 --- a/pkg/tcpip/tcpip.go +++ b/pkg/tcpip/tcpip.go @@ -359,6 +359,12 @@ func (m AddressMask) Prefix() int { return p } +// Equal returns whether m and other are equal. It exists for use by the cmp +// library. +func (m AddressMask) Equal(other AddressMask) bool { + return m == other +} + // Subnet is a subnet defined by its address and mask. type Subnet struct { address Address