mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-14 16:10:29 +00:00
more nodeinfo WIP, still needs admin socket support
This commit is contained in:
parent
2e45e970c6
commit
a6c254c87a
@ -77,6 +77,17 @@ func (tun *TunAdapter) write() {
|
|||||||
if !tun.isEnabled {
|
if !tun.isEnabled {
|
||||||
continue // Drop traffic if the tun is disabled
|
continue // Drop traffic if the tun is disabled
|
||||||
}
|
}
|
||||||
|
case typeSessionNodeInfoRequest:
|
||||||
|
var key keyArray
|
||||||
|
copy(key[:], from.(iwt.Addr))
|
||||||
|
tun.nodeinfo.handleReq(nil, key)
|
||||||
|
continue
|
||||||
|
case typeSessionNodeInfoResponse:
|
||||||
|
var key keyArray
|
||||||
|
copy(key[:], from.(iwt.Addr))
|
||||||
|
res := append([]byte(nil), bs[1:n]...)
|
||||||
|
tun.nodeinfo.handleRes(nil, key, res)
|
||||||
|
continue
|
||||||
default:
|
default:
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user