diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-06 08:21:18 -0700 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2021-03-06 08:48:14 -0700 |
commit | 79611c64e8d63a2cddcacb141f41be0f19b8032b (patch) | |
tree | 8e333fb6c1913123f8df3352b2fbb985a293eb56 /tun/netstack/tun.go | |
parent | 593658d9755bd33232a49c5a8f3e54d3f59a614e (diff) |
tun/netstack: bump deps and api
Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'tun/netstack/tun.go')
-rw-r--r-- | tun/netstack/tun.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tun/netstack/tun.go b/tun/netstack/tun.go index 6bdea23..4846e2f 100644 --- a/tun/netstack/tun.go +++ b/tun/netstack/tun.go @@ -74,12 +74,12 @@ func (*endpoint) LinkAddress() tcpip.LinkAddress { func (*endpoint) Wait() {} -func (e *endpoint) WritePacket(_ *stack.Route, _ *stack.GSO, protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) *tcpip.Error { +func (e *endpoint) WritePacket(_ stack.RouteInfo, _ *stack.GSO, _ tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) tcpip.Error { e.incomingPacket <- buffer.NewVectorisedView(pkt.Size(), pkt.Views()) return nil } -func (e *endpoint) WritePackets(*stack.Route, *stack.GSO, stack.PacketBufferList, tcpip.NetworkProtocolNumber) (int, *tcpip.Error) { +func (e *endpoint) WritePackets(stack.RouteInfo, *stack.GSO, stack.PacketBufferList, tcpip.NetworkProtocolNumber) (int, tcpip.Error) { panic("not implemented") } @@ -87,10 +87,10 @@ func (*endpoint) ARPHardwareType() header.ARPHardwareType { return header.ARPHardwareNone } -func (e *endpoint) AddHeader(local, remote tcpip.LinkAddress, protocol tcpip.NetworkProtocolNumber, pkt *stack.PacketBuffer) { +func (e *endpoint) AddHeader(tcpip.LinkAddress, tcpip.LinkAddress, tcpip.NetworkProtocolNumber, *stack.PacketBuffer) { } -func CreateNetTUN(localAddresses []net.IP, dnsServers []net.IP, mtu int) (tun.Device, *Net, error) { +func CreateNetTUN(localAddresses, dnsServers []net.IP, mtu int) (tun.Device, *Net, error) { opts := stack.Options{ NetworkProtocols: []stack.NetworkProtocolFactory{ipv4.NewProtocol, ipv6.NewProtocol}, TransportProtocols: []stack.TransportProtocolFactory{tcp.NewProtocol, udp.NewProtocol}, |