mirror of
https://github.com/cwinfo/yggdrasil-go.git
synced 2024-11-12 19:50:27 +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 {
|
||||
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:
|
||||
continue
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user