mirror of
https://github.com/yggdrasil-network/yggdrasil-go.git
synced 2025-04-28 22:25:07 +03:00
disable keys in link protocol traffic, since these are already known, *breaks backwards compat*
This commit is contained in:
parent
c0579024c0
commit
25f00c1c7a
2 changed files with 16 additions and 16 deletions
|
@ -204,8 +204,8 @@ func (p *peer) sendPacket(packet []byte) {
|
|||
func (p *peer) sendLinkPacket(packet []byte) {
|
||||
bs, nonce := boxSeal(&p.shared, packet, nil)
|
||||
linkPacket := wire_linkProtoTrafficPacket{
|
||||
toKey: p.box,
|
||||
fromKey: p.core.boxPub,
|
||||
//toKey: p.box,
|
||||
//fromKey: p.core.boxPub,
|
||||
nonce: *nonce,
|
||||
payload: bs,
|
||||
}
|
||||
|
@ -218,12 +218,12 @@ func (p *peer) handleLinkTraffic(bs []byte) {
|
|||
if !packet.decode(bs) {
|
||||
return
|
||||
}
|
||||
if packet.toKey != p.core.boxPub {
|
||||
return
|
||||
}
|
||||
if packet.fromKey != p.box {
|
||||
return
|
||||
}
|
||||
//if packet.toKey != p.core.boxPub {
|
||||
// return
|
||||
//}
|
||||
//if packet.fromKey != p.box {
|
||||
// return
|
||||
//}
|
||||
payload, isOK := boxOpen(&p.shared, packet.payload, &packet.nonce)
|
||||
if !isOK {
|
||||
return
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue