VK1ET : Check Bit Correction against ICAO cache

If we error correct a DF17 frame, check that the ICAOaddr exists in our
recently seen ICAO cache. This reduces the likelyhood of birthday
paradox solutions producing false ICAO addresses
This commit is contained in:
Malcolm Robb 2013-05-21 16:01:54 +01:00
parent 542b94dedb
commit e33591d65d

View file

@ -1723,9 +1723,12 @@ void decodeModesMessage(struct modesMessage *mm, unsigned char *msg) {
// IID against known good IID's. That's a TODO. // IID against known good IID's. That's a TODO.
// //
mm->correctedbits = fixBitErrors(msg, mm->msgbits); mm->correctedbits = fixBitErrors(msg, mm->msgbits);
//if ((mm->errorbit == -1) && (Modes.aggressive)) { // If we correct, validate ICAO addr to help filter birthday paradox solutions.
// mm->errorbit = fixTwoBitsErrors(msg, mm->msgbits); if (mm->correctedbits) {
//} uint32_t addr = (msg[1] << 16) | (msg[2] << 8) | (msg[3]);
if (!ICAOAddressWasRecentlySeen(addr))
mm->correctedbits = 0;
}
} }
// //
// Note that most of the other computation happens *after* we fix the // Note that most of the other computation happens *after* we fix the