summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/link/tun/device.go
diff options
context:
space:
mode:
Diffstat (limited to 'pkg/tcpip/link/tun/device.go')
-rw-r--r--pkg/tcpip/link/tun/device.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/pkg/tcpip/link/tun/device.go b/pkg/tcpip/link/tun/device.go
index bfac358f4..3829ca9c9 100644
--- a/pkg/tcpip/link/tun/device.go
+++ b/pkg/tcpip/link/tun/device.go
@@ -149,10 +149,10 @@ func attachOrCreateNIC(s *stack.Stack, name, prefix string, linkCaps stack.LinkE
err := s.CreateNICWithOptions(endpoint.nicID, endpoint, stack.NICOptions{
Name: endpoint.name,
})
- switch err {
+ switch err.(type) {
case nil:
return endpoint, nil
- case tcpip.ErrDuplicateNICID:
+ case *tcpip.ErrDuplicateNICID:
// Race detected: A NIC has been created in between.
continue
default: