tun: windows: packetNum is unused
This commit is contained in:
parent
dd8817f50e
commit
b844f1b3cc
@ -35,7 +35,6 @@ type exchgBufRead struct {
|
|||||||
type exchgBufWrite struct {
|
type exchgBufWrite struct {
|
||||||
data [packetExchangeSize]byte
|
data [packetExchangeSize]byte
|
||||||
offset uint32
|
offset uint32
|
||||||
packetNum uint32
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type NativeTun struct {
|
type NativeTun struct {
|
||||||
@ -314,7 +313,6 @@ func (tun *NativeTun) Flush() error {
|
|||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
defer func() {
|
defer func() {
|
||||||
tun.wrBuff.packetNum = 0
|
|
||||||
tun.wrBuff.offset = 0
|
tun.wrBuff.offset = 0
|
||||||
}()
|
}()
|
||||||
retries := maybeRetry(1000)
|
retries := maybeRetry(1000)
|
||||||
@ -375,7 +373,6 @@ func (tun *NativeTun) putTunPacket(buff []byte) error {
|
|||||||
packet = packet[packetExchangeAlignment : packetExchangeAlignment+size]
|
packet = packet[packetExchangeAlignment : packetExchangeAlignment+size]
|
||||||
copy(packet, buff)
|
copy(packet, buff)
|
||||||
|
|
||||||
tun.wrBuff.packetNum++
|
|
||||||
tun.wrBuff.offset += pSize
|
tun.wrBuff.offset += pSize
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
Loading…
Reference in New Issue
Block a user