diff options
author | gVisor bot <gvisor-bot@google.com> | 2020-02-11 12:58:13 -0800 |
---|---|---|
committer | gVisor bot <gvisor-bot@google.com> | 2020-02-11 12:59:11 -0800 |
commit | b8e22e241cab625d2809034c74d0ff808b948b4c (patch) | |
tree | bcb750ceb1341495e22bb3fa1ad2110a0b215ddc /pkg/tcpip/stack/nic.go | |
parent | 9be46e55c2aadcf40c9abd4b515c3fe899d9fa08 (diff) |
Disallow duplicate NIC names.
PiperOrigin-RevId: 294500858
Diffstat (limited to 'pkg/tcpip/stack/nic.go')
-rw-r--r-- | pkg/tcpip/stack/nic.go | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/pkg/tcpip/stack/nic.go b/pkg/tcpip/stack/nic.go index 78d451cca..ca3a7a07e 100644 --- a/pkg/tcpip/stack/nic.go +++ b/pkg/tcpip/stack/nic.go @@ -1215,6 +1215,11 @@ func (n *NIC) ID() tcpip.NICID { return n.id } +// Name returns the name of n. +func (n *NIC) Name() string { + return n.name +} + // Stack returns the instance of the Stack that owns this NIC. func (n *NIC) Stack() *Stack { return n.stack |