more nodeinfo WIP, still needs admin socket support

This commit is contained in:
Arceliar 2021-05-16 14:00:37 -05:00
parent 2e45e970c6
commit a6c254c87a

View File

@ -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
}