pkt->offset = 2 * sizeof(node_id_t);
from = lookup_node_id(SRCID(pkt));
- if(from && !memcmp(DSTID(pkt), &nullid, sizeof(nullid)) && from->status.sptps) {
+ if(from && from->status.sptps && !memcmp(DSTID(pkt), &nullid, sizeof(nullid))) {
if(sptps_verify_datagram(&from->sptps, DATA(pkt), pkt->len - 2 * sizeof(node_id_t))) {
n = from;
} else {
pkt->len -= pkt->offset;
}
- if(!memcmp(DSTID(pkt), &nullid, sizeof(nullid)) || !relay_enabled) {
+ if(!relay_enabled || !memcmp(DSTID(pkt), &nullid, sizeof(nullid))) {
direct = true;
from = n;
to = myself;