avoid assert for mostly absurdly long PV names

Longer than typical ethernet MTU,
but less than UDP packet limit.
This commit is contained in:
Michael Davidsaver
2022-10-13 16:44:15 -07:00
parent b0c36f365e
commit cfde0e26d8
+11 -4
View File
@@ -1012,10 +1012,17 @@ void ContextImpl::tickSearch(bool discover)
continue;
} else if(size_t(M.save() - searchMsg.data()) > maxSearchPayload) {
assert(payload); // must have something
// too large, defer
M.restore(save);
break;
if(payload) {
// other names did fit, defer this one to the next packet
M.restore(save);
break;
} else {
// some slightly less absurdly long PV name.
// Less than the UDP packet limit, but longer
// than typical MTU. Try to send, probably
// no choice but to fragment.
}
}
count++;