From 79611c64e8d63a2cddcacb141f41be0f19b8032b Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 6 Mar 2021 08:21:18 -0700 Subject: tun/netstack: bump deps and api Signed-off-by: Jason A. Donenfeld --- tun/netstack/tun.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tun/netstack/tun.go') 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}, -- cgit v1.2.3