diff options
Diffstat (limited to 'pkg/tcpip/sample/tun_tcp_echo/main.go')
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_echo/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_echo/main.go b/pkg/tcpip/sample/tun_tcp_echo/main.go index b23dc13e7..da6202f97 100644 --- a/pkg/tcpip/sample/tun_tcp_echo/main.go +++ b/pkg/tcpip/sample/tun_tcp_echo/main.go @@ -128,12 +128,15 @@ func main() { log.Fatal(err) } - linkID := fdbased.New(&fdbased.Options{ + linkID, err := fdbased.New(&fdbased.Options{ FD: fd, MTU: mtu, EthernetHeader: *tap, Address: tcpip.LinkAddress(maddr), }) + if err != nil { + log.Fatal(err) + } if err := s.CreateNIC(1, linkID); err != nil { log.Fatal(err) } |