mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 14:15:06 +03:00
more nodeinfo WIP, still needs admin socket support
This commit is contained in:
parent
2e45e970c6
commit
a6c254c87a
1 changed files with 11 additions and 0 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue