Commit Graph

146 Commits

Author SHA1 Message Date
Keith Winstein 58589787ea Make compressor take string references (closes #214 github issue) 2012-04-19 01:35:15 -04:00
Keith Winstein feb352c809 Optional verifier for round-trippability, and fix wrapping and tab bugs. 2012-04-16 09:09:20 -04:00
Keith Winstein a8c3df9c80 More robust shutdown sequence with warning on unclean shutdown. 2012-04-16 06:22:35 -04:00
Keith Winstein 99e8626a01 Tidy check for exception in Network::Connection::send(). 2012-04-15 23:29:05 -04:00
Keith Winstein aca69ef684 Server does not need to raise exception on failed sendto(). Fixes #183. 2012-04-15 23:13:58 -04:00
Keegan McAllister cd2d482484 Don't use *_t for our own typedefs
It's reserved by POSIX.

(closes #158 pull request)
2012-04-15 13:50:18 -04:00
Keegan McAllister 8bcc001b52 Remove Boost entirely 2012-04-15 13:49:15 -04:00
Keegan McAllister 83694977a7 Remove boost::lambda from transportsender.cc 2012-04-15 13:49:15 -04:00
Keegan McAllister 5904d4f5e6 Remove BOOST_AUTO from transportsender.cc 2012-04-15 13:49:15 -04:00
Keith Winstein 7be90ae244 Close server-related file descriptors before executing child process
Closes #170 github issue.
2012-04-13 13:48:56 -04:00
Keegan McAllister d2434d1a79 Check compiler support for -fno-default-inline and -pipe
clang was spewing warnings about the unrecognized -fno-default-inline.  (Oddly,
it warns only with -c, not when compiling directly to an executable.)  For
completeness we also check -pipe, even though clang is OK with that one.

It should be fine to omit either flag.  gcc -fno-default-inline drops the
implicit 'inline' annotation on functions defined inside a class scope, but
'inline' is only a hint anyway.  -fno-default-inline does not change linkage.
-pipe is merely a compile speed optimization.
2012-04-13 12:27:27 -04:00
Keegan McAllister 349e2d20c8 Use the hardening flags
Closes #79.
2012-04-13 12:25:09 -04:00
Alexander Chernyakhovsky 87d57c9567 Add unistd.h to network.cc to allow mosh to build on Fedora Rawhide (future Fedora 18) 2012-03-26 18:46:52 -04:00
Keegan McAllister 4eb3cace0b Use the PRNG class for chaff
In particular, srand( time( NULL ) ) is very predictable.

[keithw@mit.edu -- modified to use byte PRNG from /dev/urandom]
2012-03-19 23:12:07 -04:00
Keith Winstein 483bfe9f0f Make make_chaff() static class function to fix spurious clang warning 2012-03-18 14:11:49 -04:00
Keith Winstein ee2aea1a6e Add chaff to outgoing instructions (closes #26 github issue) 2012-03-18 13:56:27 -04:00
Keith Winstein 3d4ce8b52d Revert "Increase shutdown retries before giving up"
This reverts commit df54a869e9.

This takes too long and the UI is not pretty (since lasts more than 1 s).
2012-03-18 03:41:16 -04:00
Keith Winstein df54a869e9 Increase shutdown retries before giving up 2012-03-17 15:08:17 -04:00
Keith Winstein 66c6c0669a Print pre-CONNECT output only on failure 2012-03-10 03:55:25 -05:00
Keith Winstein df3eec1397 Allow explicit UDP port option, confine ports to range 60000..61000 2012-03-10 03:34:47 -05:00
Keith Winstein df5d163f9c Fix asserts with side-effects (per Keegan McAllister) 2012-03-08 10:50:19 -05:00
Anders Kaseorg edada5e1ea Don’t use $(builddir)
$(builddir) is always ., except apparently on automake 1.9 which
doesn’t define it.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:10:19 -05:00
Quentin Smith a1671bcf3b Handle the absence of IP_MTU_DISCOVER 2012-03-07 03:05:36 -05:00
Quentin Smith e8d14d35a6 Add boost and protobuf in the places where they are needed
[seph@directionless.org, andersk@mit.edu: add in even more places]
2012-03-07 03:05:36 -05:00
Quentin Smith 582bf347c9 Add alternate timestamp implementations
Add mach_absolute_time and gettimeofday timestamp implementations, and
fix clock_gettime check so that it can actually succeed
2012-03-07 03:05:36 -05:00
Quentin Smith 17d6962af8 Check for proper byteorder functions
[andersk@mit.edu: Add byteorder.h to libmoshcrypto_a_SOURCES]
2012-03-07 03:05:36 -05:00
Anders Kaseorg aad760e7d6 Make warning CXXFLAGS configurable
This turns off -Werror by default except in the Debian package.
-Werror is inherently unportable and breaks things on OS X.  While it
can cause problems in Debian too, this is at least a little better.

It also turns off -pedantic in src/protobufs, because apparently
protoc output doesn’t compile with -pedantic on all platforms.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-03-07 03:05:35 -05:00
Keegan McAllister 12fcf6800a Change timeout from -1 to INT_MAX in TransportSender
This allows min() to work properly on timeouts.
2012-03-06 11:57:45 -08:00
Keegan McAllister e35733a2c1 Rename 'attached' to 'has_remote_addr'
Even with future support for detaching and reattaching, this variable will keep
its original meaning.
2012-03-06 11:54:56 -08:00
Keith Winstein 9e13176d96 Fix build problem on i386 2012-02-26 13:51:11 -05:00
Keith Winstein 7a9f92d7f1 Compress all instructions (closes #19 github issue) 2012-02-26 04:41:03 -05:00
Keith Winstein f0886a1dda Add const to fragmenter 2012-02-26 03:59:00 -05:00
Keith Winstein e5c8c33f4f Fix timing of echo acks 2012-02-26 02:49:53 -05:00
Keith Winstein f0199e2695 Bump version numbers (including Mosh protocol version)
This server is now incompatible with older clients and vice versa.
2012-02-25 15:16:21 -05:00
Keith Winstein 3a92cd1393 Explicit echo ack protobuf with reliable semantics 2012-02-25 14:34:39 -05:00
Keith Winstein a2b293c027 Make retry more aggressive even absent new data (fixes #23 github issue) 2012-02-25 12:12:16 -05:00
Keith Winstein 58b584a2b3 Move from protobuf-lite to protobuf to accommodate Ubuntu lucid
Add changelog entry
2012-02-20 00:40:08 -05:00
Anders Kaseorg 689eedc271 Compile without --std=c++0x
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg 7d19fbe203 Replace C++0x auto with Boost Typeof library
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg bd3ffb85d5 Replace C++0x lambda with Boost Lambda Library
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 21:29:51 -05:00
Anders Kaseorg 6c52c1d306 Purge ‘using namespace std’ from header files
std::bind and boost::lambda::bind don’t mix.

Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 20:22:12 -05:00
Anders Kaseorg af649a035c Add missing #includes
Signed-off-by: Anders Kaseorg <andersk@mit.edu>
2012-02-17 19:24:51 -05:00
Keith Winstein feb64eec52 Make utmp entries using utempter 2012-02-13 05:43:07 -05:00
Keith Winstein d8533ca3a6 Get rid of PMTU discovery; Cisco VPN has MTU=1200 and breaks ICMP too-big. 2012-02-09 00:36:28 -05:00
Keith Winstein 3781a290c8 Add copyright/license notices 2012-02-06 20:52:48 -05:00
Keith Winstein 38c9e99882 Separate modules by subdirectory 2012-02-06 18:26:45 -05:00