summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip
diff options
context:
space:
mode:
authorgVisor bot <gvisor-bot@google.com>2019-08-14 22:11:02 +0000
committergVisor bot <gvisor-bot@google.com>2019-08-14 22:11:02 +0000
commit0e0132554a03dcfd407e73ef241f7096ef581d9e (patch)
treec0c558f5bb418f93c51caf69a8ca3cb6e046bb2f /pkg/tcpip
parentc68a9749ed24e5061093e4f0490553ee5ecad1f8 (diff)
parent69d1414a322dd2ad9b669bceaf59617b333e424a (diff)
Merge 69d1414a (automated)
Diffstat (limited to 'pkg/tcpip')
-rw-r--r--pkg/tcpip/tcpip.go5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/tcpip.go b/pkg/tcpip/tcpip.go
index 119712d2f..db6d5a9bf 100644
--- a/pkg/tcpip/tcpip.go
+++ b/pkg/tcpip/tcpip.go
@@ -1072,6 +1072,11 @@ type AddressWithPrefix struct {
PrefixLen int
}
+// String implements the fmt.Stringer interface.
+func (a AddressWithPrefix) String() string {
+ return fmt.Sprintf("%s/%d", a.Address, a.PrefixLen)
+}
+
// ProtocolAddress is an address and the network protocol it is associated
// with.
type ProtocolAddress struct {