Fix in-air restarts, protect against an external MAVLink sender exploiting the restart mechanism

This commit is contained in:
Lorenz Meier
2014-05-06 14:57:06 +02:00
parent 13ad95169f
commit 1d6b9fae03
3 changed files with 31 additions and 4 deletions
+6
View File
@@ -217,6 +217,12 @@ MavlinkReceiver::handle_message_command_long(mavlink_message_t *msg)
_mavlink->_task_should_exit = true;
} else {
if (msg->sysid == mavlink_system.sysid && msg->compid == mavlink_system.compid) {
warnx("ignoring CMD spoofed with same SYS/COMP ID");
return;
}
struct vehicle_command_s vcmd;
memset(&vcmd, 0, sizeof(vcmd));