]> git.ipfire.org Git - thirdparty/wireguard-go.git/commitdiff
tun: windows: packetNum is unused
authorJason A. Donenfeld <Jason@zx2c4.com>
Mon, 1 Jul 2019 11:37:54 +0000 (13:37 +0200)
committerJason A. Donenfeld <Jason@zx2c4.com>
Mon, 1 Jul 2019 13:23:44 +0000 (15:23 +0200)
tun/tun_windows.go

index 1de74e688657c203c0749f69ee7ccf4b10c28dfc..543482eb2bfa656432b94f18ec5c90702f23cb5e 100644 (file)
@@ -35,7 +35,6 @@ type exchgBufRead struct {
 type exchgBufWrite struct {
        data      [packetExchangeSize]byte
        offset    uint32
-       packetNum uint32
 }
 
 type NativeTun struct {
@@ -314,7 +313,6 @@ func (tun *NativeTun) Flush() error {
                return nil
        }
        defer func() {
-               tun.wrBuff.packetNum = 0
                tun.wrBuff.offset = 0
        }()
        retries := maybeRetry(1000)
@@ -375,7 +373,6 @@ func (tun *NativeTun) putTunPacket(buff []byte) error {
        packet = packet[packetExchangeAlignment : packetExchangeAlignment+size]
        copy(packet, buff)
 
-       tun.wrBuff.packetNum++
        tun.wrBuff.offset += pSize
 
        return nil