mavlink: onboard links should only pass on messages from the same system ID

This commit is contained in:
Julian Oes 2014-07-24 17:57:30 +02:00
parent 1fdc666bb0
commit b4e6f535ea
1 changed files with 6 additions and 1 deletions

View File

@ -483,7 +483,12 @@ Mavlink::forward_message(const mavlink_message_t *msg, Mavlink *self)
Mavlink *inst;
LL_FOREACH(_mavlink_instances, inst) {
if (inst != self) {
inst->pass_message(msg);
/* if not in normal mode, we are an onboard link
* onboard links should only pass on messages from the same system ID */
if(!(self->_mode != MAVLINK_MODE_NORMAL && msg->sysid != mavlink_system.sysid)) {
inst->pass_message(msg);
}
}
}
}