diff options
author | Fabricio Voznika <fvoznika@google.com> | 2019-04-17 11:14:24 -0700 |
---|---|---|
committer | Shentubot <shentubot@google.com> | 2019-04-17 11:16:35 -0700 |
commit | 9f8c89fc7fb7c4588713eb376fa56c4c3026d43c (patch) | |
tree | afa9bea24c4c4685d16e6ef3cb432e9b3ac425ae /pkg/tcpip/sample/tun_tcp_connect/main.go | |
parent | e8156667179c52c40f54affc085009258ae11092 (diff) |
Return error from fdbased.New
RELNOTES: n/a
PiperOrigin-RevId: 244031742
Change-Id: Id0cdb73194018fb5979e67b58510ead19b5a2b81
Diffstat (limited to 'pkg/tcpip/sample/tun_tcp_connect/main.go')
-rw-r--r-- | pkg/tcpip/sample/tun_tcp_connect/main.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/tcpip/sample/tun_tcp_connect/main.go b/pkg/tcpip/sample/tun_tcp_connect/main.go index 327a79f48..cf8900c4d 100644 --- a/pkg/tcpip/sample/tun_tcp_connect/main.go +++ b/pkg/tcpip/sample/tun_tcp_connect/main.go @@ -137,7 +137,10 @@ func main() { log.Fatal(err) } - linkID := fdbased.New(&fdbased.Options{FD: fd, MTU: mtu}) + linkID, err := fdbased.New(&fdbased.Options{FD: fd, MTU: mtu}) + if err != nil { + log.Fatal(err) + } if err := s.CreateNIC(1, sniffer.New(linkID)); err != nil { log.Fatal(err) } |