Fix reception of SPTPS UDP packets.
Some bugs were introduced in 46fa12e666
.
This commit is contained in:
parent
558b19c243
commit
199573f1e8
1 changed files with 2 additions and 2 deletions
|
@ -372,7 +372,7 @@ static bool receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
if(!sptps_receive_data(&n->sptps, ((sptps_packet_t *)&inpkt)->data, inpkt->len)) {
|
||||
if(!sptps_receive_data(&n->sptps, ((sptps_packet_t *)inpkt)->data, inpkt->len)) {
|
||||
logger(DEBUG_TRAFFIC, LOG_ERR, "Got bad packet from %s (%s)", n->name, n->hostname);
|
||||
return false;
|
||||
}
|
||||
|
@ -1077,7 +1077,7 @@ skip_harder:
|
|||
}
|
||||
|
||||
if(n->status.sptps) {
|
||||
if(memcmp(&spkt->dstid, &nullid, sizeof nullid)) {
|
||||
if(!memcmp(&spkt->dstid, &nullid, sizeof nullid)) {
|
||||
direct = true;
|
||||
from = n;
|
||||
to = myself;
|
||||
|
|
Loading…
Reference in a new issue