-
Notifications
You must be signed in to change notification settings - Fork 744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
On client, connect() to server. #1013
base: master
Are you sure you want to change the base?
Conversation
This keeps mosh-client from receiving wayward UDP packets from other sources.
The original reason we didn't In any event, if we do do this I'd rather wait until after the next release since it does seem like something of a major change. |
In all my years of moshing, this is the first time I've seen regular "packet failed integrity check" messages. But my work laptop changes networks about a dozen times per day, and an additional 15-second delay during each change would be pretty noticeable and annoying, I think. What about quelling the "packet failed integrity check" message in certain cases (like the packet comes from a machine that doesn't look like the the mosh-server machine)? |
This approximately restores Mosh's fast recovery on roaming. retry once on send() error
This new commit should approximately restore the old roaming behavior. But I agree that this idea isn't a good candidate for the next release. I think the If we do anything for the next release, it should be quieting the error reporting for short/crypto-bad packets, that seems less controversial. |
@eminence, is it possible your machine is getting port-scanned, or otherwise getting actively probed? (Doesn't have to be malign, your IT people could be doing it...) |
Not likely, since this was while I was on my internal home network (and I wasn't doing any scanning). This network has several different devices on it (windows, linux, mobile devices, smart devices), and while I can't take a guess at what might have been sending those packets, I wouldn't be surprised if mosh-client hopped, by sheer coincidence, onto some port that gets periodically probed by something on my network. |
Hmm, that might be broadcast/multicast from mDNS (port 5353) or UPNP (port 1900) or something like that. That's another thing Mosh could check, it could drop non-unicast packets, or packets not to a local address, or something. |
This was provoked by @eminence commenting on IRC that he was getting 'packet failed integrity check' messages on his client.
This should be a pretty reasonable add, but I worry about weird scenarios where clients are somehow actually receiving packets on 4-tuples that are different from the ones they're sending packets on.
One effect I've also noticed in testing is that with this change, Mosh is slightly slower to recover from clients hopping to new networks. Comparing old behavior to new:
Old:
New:
connect()
, thus binding the connection to the source IP addressconnect()
ed on the new IP address, and the session resumes.In my testing, that's not a big issue, because of the human and computer time already taken by manually switching to a new network, acquiring new link/IP address/whatever. But does anybody see this as a problem? Are there any Mosh users who are rapidly hopping between different IP addresses on their clients?