Fix segfault when receiving UDP packets with an unknown source address.
This commit is contained in:
parent
5104001bae
commit
558b19c243
1 changed files with 1 additions and 1 deletions
|
@ -1056,7 +1056,7 @@ void handle_incoming_vpn_data(void *data, int flags) {
|
||||||
// It might be from a 1.1 node, which might have a source ID in the packet.
|
// It might be from a 1.1 node, which might have a source ID in the packet.
|
||||||
from = lookup_node_id(&spkt->srcid);
|
from = lookup_node_id(&spkt->srcid);
|
||||||
if(from && !memcmp(&spkt->dstid, &nullid, sizeof nullid) && from->status.sptps) {
|
if(from && !memcmp(&spkt->dstid, &nullid, sizeof nullid) && from->status.sptps) {
|
||||||
if(sptps_verify_datagram(&n->sptps, spkt->data, spkt->len - sizeof(spkt->srcid) - sizeof(spkt->dstid)))
|
if(sptps_verify_datagram(&from->sptps, spkt->data, spkt->len - sizeof(spkt->srcid) - sizeof(spkt->dstid)))
|
||||||
n = from;
|
n = from;
|
||||||
else
|
else
|
||||||
goto skip_harder;
|
goto skip_harder;
|
||||||
|
|
Loading…
Reference in a new issue