Don't use DF18 when updating the known-Mode-S-address set.

DF18 transponders don't necessarily do Mode S, so we shouldn't assume
that Mode S messages from that address are valid merely because we
heard a DF18. If it really is Mode S equipped, we should hear a
DF11 at some point.
This commit is contained in:
Oliver Jowett 2019-01-21 20:11:12 +00:00
parent 9c124b3f2b
commit c05aea65a4

View file

@ -681,12 +681,12 @@ int decodeModesMessage(struct modesMessage *mm, unsigned char *msg)
mm->airground = AG_UNCERTAIN; mm->airground = AG_UNCERTAIN;
} }
if (!mm->correctedbits && (mm->msgtype == 17 || mm->msgtype == 18 || (mm->msgtype == 11 && mm->IID == 0))) { if (!mm->correctedbits && (mm->msgtype == 17 || (mm->msgtype == 11 && mm->IID == 0))) {
// No CRC errors seen, and either it was an DF17/18 extended squitter // No CRC errors seen, and either it was an DF17 extended squitter
// or a DF11 acquisition squitter with II = 0. We probably have the right address. // or a DF11 acquisition squitter with II = 0. We probably have the right address.
// We wait until here to do this as we may have needed to decode an ES to note // Don't do this for DF18, as a DF18 transmitter doesn't necessarily have a
// the type of address in DF18 messages. // Mode S transponder.
// NB this is the only place that adds addresses! // NB this is the only place that adds addresses!
icaoFilterAdd(mm->addr); icaoFilterAdd(mm->addr);