mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
Don't use channels for ICMPv6 packets
This commit is contained in:
parent
fac4bf796e
commit
6571a8c300
2 changed files with 20 additions and 29 deletions
|
@ -79,7 +79,12 @@ func (tun *tunDevice) read() error {
|
|||
// Found an ICMPv6 packet
|
||||
b := make([]byte, n)
|
||||
copy(b, buf)
|
||||
tun.icmpv6.recv <- b
|
||||
// tun.icmpv6.recv <- b
|
||||
if tun.iface.IsTAP() {
|
||||
go tun.icmpv6.parse_packet_tap(b)
|
||||
} else {
|
||||
go tun.icmpv6.parse_packet_tun(b)
|
||||
}
|
||||
}
|
||||
packet := append(util_getBytes(), buf[o:n]...)
|
||||
tun.send <- packet
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue