mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-29 06:43:34 +08:00
mavlink: onboard links should only pass on messages from the same system ID
This commit is contained in:
@@ -483,7 +483,12 @@ Mavlink::forward_message(const mavlink_message_t *msg, Mavlink *self)
|
|||||||
Mavlink *inst;
|
Mavlink *inst;
|
||||||
LL_FOREACH(_mavlink_instances, inst) {
|
LL_FOREACH(_mavlink_instances, inst) {
|
||||||
if (inst != self) {
|
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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user