weixin_39655981
weixin_39655981
2020-11-28 17:29

No longer automatically connect UDP on startup.

Also removed some dead code.

该提问来源于开源项目:mavlink/qgroundcontrol

  • 点赞
  • 写回答
  • 关注问题
  • 收藏
  • 复制链接分享
  • 邀请回答

8条回答

  • weixin_39812577 weixin_39812577 5月前

    Not sure I want to merge this. Network applications acting like a server (like QGC does) should connect on startup. You're not starting apache or any other service and then expect to still have to connect it. It just sits there and waits for connections.

    点赞 评论 复制链接分享
  • weixin_39655981 weixin_39655981 5月前

    The issue with your comparison to Apache is that with a standard daemon program the process when first using it is this:. 1. Configure the daemon 2. Set the daemon to autostart on startup 3. Start the daemon for the first time

    QGC offers a different approach 1. Automatically start a network server

    So the problem is that while it may make sense to have QGC auto-start its UDP watching for you, it's a problem for many users because there's no configuration step. Upon starting QGC UDP is automatically opened and results in Windows a Firewall prompt that the user has no idea why it's there. Usually the user will automatically allow or there's no prompt on other OSes, and in that case there's now a potential security hole because this UDP port is Internet-accessible. Additionally this UDP connection can cause problems for other UDP programs on the computer; in my case HIL is done over UDP and I just happened to use port 14550 by default as well, so there was conflict with my HIL and QGC originally.

    So the problem here is not that QGC does it, it's that it does it automatically. If the user hasn't configured a connection, it makes little sense to automatically connect it, especially given the security implications. I would argue auto-starting UDP like this makes as much sense as automatically connecting to the first available serial port at 115200 baud.

    So a resolution to this could be a setting for all connections to automatically connect at startup. This would also remember what Links you have configured so that only those saved ones were populated at startup. It's always seemed weird that those two links were automatically available when you could create them yourself post-startup.

    点赞 评论 复制链接分享
  • weixin_39655981 weixin_39655981 5月前

    This is also annoying that QGC likes to warn of existing UDP connections on startup, as I've been running 2 QGC instances for debugging/development purposes and the second one always wants me to quit it.

    点赞 评论 复制链接分享
  • weixin_39655981 weixin_39655981 5月前

    Also, another way to get this "server" functionality is to have QGC store the last connection settings in its settings. On startup it should reload these connection and prompt the user if they'd like to connect to any of them (this would be a multiple-select dropdown so that any/all of the connections can be opened).

    点赞 评论 复制链接分享
  • weixin_39812577 weixin_39812577 5月前

    I appreciate your comments. Still pondering what to do.

    点赞 评论 复制链接分享
  • weixin_39655981 weixin_39655981 5月前

    If further discussion is desired, then to further it it would be useful to know under what use cases or scenarios this functionality is useful and why work-arounds or alternative functionality doesn't provide an adequate solution.

    On Thu, May 30, 2013 at 9:40 AM, Lorenz Meier notifications.comwrote:

    I appreciate your comments. Still pondering what to do.

    — Reply to this email directly or view it on GitHubhttps://github.com/mavlink/qgroundcontrol/pull/266#issuecomment-18692636 .

    点赞 评论 复制链接分享
  • weixin_39812577 weixin_39812577 5月前

    Fair enough, lets settle this today. I'll post on the mailing list. I will try to find a compromise.

    点赞 评论 复制链接分享
  • weixin_39655981 weixin_39655981 5月前

    So is there any progress on resolving this? I never saw a mailing list post.

    点赞 评论 复制链接分享

相关推荐