Log an error message with the node's name when receiving bad SPTPS packets.
The SPTPS code doesn't know about nodes, so when it logs an error about a bad packet, it doesn't log which node it came from. So add a log message with the node's name and hostname in receive_udppacket().
This commit is contained in:
parent
660a2c7d1b
commit
b90c42a33b
1 changed files with 5 additions and 1 deletions
|
@ -372,7 +372,11 @@ static bool receive_udppacket(node_t *n, vpn_packet_t *inpkt) {
|
|||
}
|
||||
return false;
|
||||
}
|
||||
return sptps_receive_data(&n->sptps, (char *)&inpkt->seqno, inpkt->len);
|
||||
if(!sptps_receive_data(&n->sptps, (char *)&inpkt->seqno, inpkt->len)) {
|
||||
logger(DEBUG_TRAFFIC, LOG_ERR, "Got bad packet from %s (%s)", n->name, n->hostname);
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
if(!n->status.validkey) {
|
||||
|
|
Loading…
Reference in a new issue