olgeni
2e39dbc977
Fix calls to setsockopt.
...
On FreeBSD, the socket option length must be declared as an int.
While I'm here, translate dscp (0x92) to the appropriate constants.
(tested on FreeBSD only so far)
2012-10-22 14:29:39 +02:00
Keith Winstein
da18a8c7ea
Detect edge case when argc == 0
2012-10-20 14:17:19 -04:00
Keegan McAllister
cd394c61ae
Allow building the ocb.c test program with -DOCB_TEST_PROGRAM
2012-10-19 15:33:48 -04:00
Keegan McAllister
ee8d0ce582
Fix ocb.c test program so it builds with -Wall -Werror
2012-10-19 15:33:48 -04:00
Keegan McAllister
029e8bbde5
Import 08-SEP-2012 version of ocb.c
...
... plus the local changes from:
3b2604b Handle early gcc compilers that are missing __builtin_bswap64 or __builtin_ctz
e8236c5 Use AlignedBuffer stedda posix_memalign(). Should work on PPC OS X 10.5.
9827d12 Switch to OpenSSL AES
2012-10-19 15:33:48 -04:00
Keith Winstein
39276a46ad
More conservative default MTU, and react to MSGSIZE
2012-10-16 17:46:05 -04:00
Keith Winstein
be3b1259b6
Make sendto() non-blocking
2012-10-16 17:40:02 -04:00
Keith Winstein
052e7cc812
Change assert() to fatal_assert() since can be triggered by evil sender
2012-10-05 04:14:49 -04:00
Ira Cooper
deecf6bb2f
Add limits.h to allow for illumos to compile.
...
Closes #331
2012-10-05 04:02:11 -04:00
Keith Winstein
c0092a6e7e
Hop new ports, but keep the old [for a minute, and up to 10 at a time]
...
(One is silver and the other gold...)
2012-10-05 02:51:25 -04:00
Keith Winstein
d17fb7824b
Reset fd sets every time we poll (because network.fd() can now change)
2012-10-05 00:06:37 -04:00
Keith Winstein
50e75b3127
Make sure we're not querying fds that we never polled for in the first place
2012-10-04 23:53:34 -04:00
Keith Winstein
b8df3eed11
Lengthen port hop interval to 30 seconds
2012-10-04 23:46:08 -04:00
Keith Winstein
9eb9a0386e
Warn on congestion
2012-10-04 21:47:58 -04:00
Keith Winstein
9cf411ac3f
Change server association timeout to 40 seconds
2012-10-04 21:45:42 -04:00
Keith Winstein
f621f9f001
Grammar fix on ssh -t message
2012-09-28 20:17:58 -04:00
Keith Winstein
0311365810
Read utmpx directly instead of using "who", and prettify detached warning
2012-09-28 20:06:04 -04:00
Keith Winstein
9ac3b65090
Respond to explicit congestion notification (slow down sender)
2012-09-28 19:07:31 -04:00
Xi Wang
f0d9cb3db3
Avoid null pointer dereference in chdir_homedir()
...
Return if pw is NULL, to avoid dereferencing it at pw->pw_dir.
2012-09-26 22:27:24 -04:00
Keith Winstein
815aff9a73
Don't assert has_remote_addr, because can change between fragments.
2012-08-15 23:58:21 +03:00
Keith Winstein
bf8a29f783
Improve rendition-matching prediction heuristic.
2012-08-14 07:40:50 -04:00
Keith Winstein
63e66e9855
Add heuristic to match predicted rendition based on char to the left
2012-08-13 10:56:50 -04:00
Keith Winstein
5376ed1996
Use end-to-end-to-end connectivity (in transport layer) to control port hop.
...
Avoid playing games with network-layer timestamps.
2012-08-13 16:48:25 +03:00
Keith Winstein
a21fed3dca
Remove automatic hopping triggers from SSP.
2012-08-13 14:59:20 +03:00
Keith Winstein
82830344ca
Hop ports when missing E2E2E connectivity, even if downlink working.
2012-08-13 14:26:53 +03:00
Keith Winstein
89da6105aa
When not connected, (1) client hops port numbers (2) server stops sending.
2012-08-13 11:19:25 +03:00
Timo Sirainen
9296ffbed7
Don't reopen stdio. It's not needed, and it doesn't compile with Solaris.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:45 -04:00
Timo Sirainen
9cade23616
It's safer to close stdin/out/err by replacing their fd with /dev/null.
...
Otherwise the next opened fds are 0/1/2, and any code writing to
stdout/stderr might break things by writing to an unintentional fd.
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:45 -04:00
Timo Sirainen
b245ed00ca
Don't call setsid(), forkpty() does it anyway. This fixes a failing ioctl(TIOCSCTTY) in Solaris.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:45 -04:00
Timo Sirainen
4f66e9a2e0
Remove __STRING() usage. It's nonstandard, while #expr works everywhere nowadays.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Timo Sirainen
7117b61bf4
Don't do a 64bit read access from a string, since it may not be 64bit aligned.
...
Fixes crash with CPUs that require aligned access.
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Timo Sirainen
620152261e
Don't use s_addr as parameter name. Fixes compiling with Solaris.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Timo Sirainen
0c5307f345
Added forkpty() and cfmakeraw() fallback implementations if they don't exist.
...
Signed-off-by: Timo Sirainen <tss@iki.fi >
2012-08-11 17:14:44 -04:00
Keith Winstein
894a190f06
Revert creation of utmp entry to avoid uninitialized "master"
2012-08-11 17:13:43 -04:00
Keith Winstein
7989d381cf
Make fatal_assert() use abort() instead of exit()
2012-08-07 12:34:45 -04:00
Keith Winstein
c073ad364a
get_SSH_IP gracefully handles missing, IPv6-formatted environment var
...
Closes #292 github issue.
2012-07-26 22:54:45 -04:00
Keith Winstein
02f54881be
Use BEL instead of ST to terminate Operating System Command
...
ST is more correct, but BEL is apparently more widely supported.
Closes #304
2012-07-26 22:01:53 -04:00
Keith Winstein
a744004bf6
Get system timestamp less often (only after sleeping/selecting)
2012-07-26 21:13:26 -04:00
Anders Kaseorg
5e3ec2e037
Instantiate Parser::family once
...
Signed-off-by: Anders Kaseorg <andersk@mit.edu >
2012-07-24 15:01:55 -04:00
Keith Winstein
2cb2f3aeb5
Tidy up unattached warning, only print when showing motd
2012-07-23 01:25:55 -04:00
Keith Winstein
549cf0a9bd
Warn of unattached Mosh sessions on login
2012-07-23 01:16:57 -04:00
Keith Winstein
92ecb99b71
Add OpenSSL licensing exception
2012-07-20 16:46:00 -04:00
Keith Winstein
428d9b48c5
Remove AES reference implementation
2012-07-20 16:10:53 -04:00
Keith Winstein
9827d123f8
Switch to OpenSSL AES
2012-07-20 16:10:12 -04:00
Keith Winstein
57c4904ed8
Switch to OpenSSL base64 routines
2012-07-20 16:00:21 -04:00
Alexander Chernyakhovsky
0099f080ad
Fix FTBFS on ARM on GCC 4.7.0
...
GCC v4.7.0, as found in Fedora 17 and newer, fails to build mosh on
ARM because of a narrowing warning, which is then promoted to an error
by -Werror. This error message is new, and did not occur under
previous versions of GCC.
This patch corrects this error by explicitly casting to the desired
datatype the return value of the offending code, the result of a macro
from glibc to implement htobe16().
2012-06-20 01:24:08 -04:00
Keith Winstein
88bed3e94a
Remove warning for IP_TOS failure
2012-06-12 14:39:36 -04:00
Keith Winstein
2df9e07926
Add "experimental" mode to local echo (always predict even when incorrect)
2012-06-11 13:21:44 -04:00
Keith Winstein
37f78d0e4c
Disable out-of-order warning (fires too much on some 802.11n networks)
...
This reverts commit 682bbdfebd .
2012-05-30 02:04:32 -04:00
Keith Winstein
ade0aaa3e8
Make IP_TOS failure non-fatal per Keegan.
2012-05-25 21:00:51 -04:00