summaryrefslogtreecommitdiffhomepage
path: root/pkg/tcpip/sample/wg_tunnel/main.go
diff options
context:
space:
mode:
authorMikael Magnusson <mikma@users.sourceforge.net>2020-03-18 21:00:32 +0100
committerMikael Magnusson <mikma@users.sourceforge.net>2020-03-18 21:00:32 +0100
commit9ff81925ffcb1833871a409c4bc004144062ae22 (patch)
tree2e33fce0c8f4b8ad3dad4663c97c2474b1b886d5 /pkg/tcpip/sample/wg_tunnel/main.go
parentda4e436c2b721d261a51e765aca844c9b85883dd (diff)
WIP create wireguard link package
Diffstat (limited to 'pkg/tcpip/sample/wg_tunnel/main.go')
-rw-r--r--pkg/tcpip/sample/wg_tunnel/main.go5
1 files changed, 3 insertions, 2 deletions
diff --git a/pkg/tcpip/sample/wg_tunnel/main.go b/pkg/tcpip/sample/wg_tunnel/main.go
index b859dff7a..1c87a09c2 100644
--- a/pkg/tcpip/sample/wg_tunnel/main.go
+++ b/pkg/tcpip/sample/wg_tunnel/main.go
@@ -44,6 +44,7 @@ import (
"gvisor.dev/gvisor/pkg/tcpip/link/loopback"
"gvisor.dev/gvisor/pkg/tcpip/link/rawfile"
"gvisor.dev/gvisor/pkg/tcpip/link/tun"
+ "gvisor.dev/gvisor/pkg/tcpip/link/wireguard"
"gvisor.dev/gvisor/pkg/tcpip/network/arp"
"gvisor.dev/gvisor/pkg/tcpip/network/ipv4"
"gvisor.dev/gvisor/pkg/tcpip/network/ipv6"
@@ -295,9 +296,9 @@ func addWgLink(s *stack.Stack, nic tcpip.NICID, interfaceName string, addr tcpip
//mtu := 1500
// tun, err := wg_tun.CreateTUN(interfaceName, mtu)
- tun, err := CreateGoTun(s, ep)
+ tun, err := wireguard.CreateWgTun(s, ep)
if err != nil {
- log.Fatal("CreateGoTun", err)
+ log.Fatal("CreateWgTun", err)
}