1
0
mirror of https://git.tartarus.org/simon/putty.git synced 2025-01-10 18:07:59 +00:00
Commit Graph

21 Commits

Author SHA1 Message Date
Jacob Nevins
20f433efac Add a configuration option for TCP keepalives (SO_KEEPALIVE), default off.
No very good reason, but I've occasionally wanted to frob it to see if it
makes any difference to problems I'm having, and it was easy.

Tested that it does actually cause keepalives on Windows (with tcpdump);
should also work on Unix. Not implemented on Mac (does nothing), but then
neither is TCP_NODELAY.

Quite a big checkin, much of which is adding `keepalive' alongside `nodelay'
in network function calls.

[originally from svn r4309]
2004-06-20 17:07:38 +00:00
Jacob Nevins
92db92af5a Control of 'addr' is now handed over to {platform_,}new_connection() and
sk_new() on invocation; these functions become responsible for (eventually)
freeing it. The caller must not do anything with 'addr' after it's been passed
in. (Ick.)

Why:
A SOCKS5 crash appears to have been caused by overzealous freeing of
a SockAddr (ssh.c:1.257 [r2492]), which for proxied connections is
squirreled away long-term (and this can't easily be avoided).

It would have been nice to make a copy of the SockAddr, in case the caller has
a use for it, but one of the implementations (uxnet.c) hides a "struct
addrinfo" in there, and we have no defined way to duplicate those. (None of the
current callers _do_ have a further use for the SockAddr.)

As far as I can tell, everything _except_ proxying only needs addr for the
duration of the call, so sk_addr_free()s immediately. If I'm mistaken, it
should at least be easier to find the offending free()...

[originally from svn r3383]
[r2492 == bdd6633970]
2003-08-07 16:04:33 +00:00
Simon Tatham
6bb121ecb9 Colin's const-fixing Patch Of Death. Seems to build fine on Windows
as well as Unix, so it can go in.

[originally from svn r3162]
2003-05-04 14:18:18 +00:00
Ben Harris
f599817d78 Move the Mac port over to using snew/snewn/sresize.
[originally from svn r3024]
2003-03-29 23:07:55 +00:00
Ben Harris
f9928fafae Move net_service_lookup() to macnet.c, since that's where it belongs.
[originally from svn r2806]
2003-02-06 01:01:27 +00:00
Ben Harris
24df1c5463 Carbonise, or at least disable MacTCP support under Carbon.
[originally from svn r2792]
2003-02-04 02:10:42 +00:00
Ben Harris
03dee4b07d Use the correct ProcInfo for AddrToStr. This makes the MacTCP code work in
PowerPC builds.  Well, makes it not crash, anyway -- AddrToStr doesn't seem
to be returning amything very useful.

[originally from svn r2651]
2003-01-18 23:26:56 +00:00
Ben Harris
c6920b01c4 MacTCP returns canonical names with a trailing dot. We don't want this, so
strip it off.

[originally from svn r2612]
2003-01-15 18:47:41 +00:00
Ben Harris
b4d37df579 Consequences of Simon's recent deglobalisation changes.
[originally from svn r2573]
2003-01-12 16:11:27 +00:00
Ben Harris
05ae857752 Correct code to insert into a doubly-linked list.
[originally from svn r2553]
2003-01-12 13:50:04 +00:00
Ben Harris
f9300b0011 Initial import of Owen's OpenTransport interface. It doesn't work yet, but
it does compile and link.

[originally from svn r2547]
2003-01-11 23:33:57 +00:00
Ben Harris
4818639014 Add an indirection layer between mtcpnet.c and the rest of PuTTY so that
we can have runtime switching between MacTCP and OpenTransport, and so
that we can cope if there's no TCP/IP stack available at all (albeit with
very little functionality at present).

[originally from svn r2546]
2003-01-11 19:43:59 +00:00
Ben Harris
2506a26ab4 Calling plug_closing() is highly likely to result in a call to sk_close(),
so arrange that mactcp_poll() can cope with that and not access freed memory
when it happens.

[originally from svn r2545]
2003-01-11 17:36:24 +00:00
Ben Harris
cd79a89c11 When polling MacTCP connections, check the connection state and if the far
end has sent a FIN pass that up to the plug.
TODO: handle less graceful connection closures.

[originally from svn r2544]
2003-01-11 17:31:59 +00:00
Ben Harris
0ea918fb3a const fallout from Simon's X forwarding changes.
[originally from svn r2540]
2003-01-11 14:08:07 +00:00
Ben Harris
c342678579 Forcibly close any TCP connections that are still open when PuTTY exits.
This saves leaving them lying around to crash the machine later.

[originally from svn r2524]
2003-01-09 23:04:34 +00:00
Ben Harris
f11987f988 Install a notification procedure (ASR) on each TCP connection that wakes
PuTTY up when something happens.  This should allow it to receive data without
having to poll for it continuously.

[originally from svn r2519]
2003-01-09 19:26:39 +00:00
Ben Harris
697794abbf Fairly major hackery to get SSH going on the Mac. Half the support
functions are only dummy stubs, but it's still minimally usable.  At
least, as long as you don't want to do anything complex like logging out.

[originally from svn r2500]
2003-01-08 22:46:12 +00:00
Ben Harris
30bff47c89 Add reception support for MacTCP. Now I can log in over TELNET, just about.
There are still lots of things to fix, like urgent data or the fact that
everything seems to happen one keypress too late, but this is an important
milestone.

[originally from svn r2458]
2003-01-05 12:53:38 +00:00
Ben Harris
ac85d9b8c9 Second work-in-progress MacTCP commit. We can now open a connection, but
not transfer any data across it.

[originally from svn r2456]
2003-01-05 10:52:56 +00:00
Ben Harris
ba15f25503 Beginnings of a MacTCP network layer. This has all of the DNS interface
present, including stuff to find and load the MacTCP DNR.  Actually making
a TCP connection is still unimplemented, though, and much testing remains
to be done.

[originally from svn r2452]
2003-01-04 19:51:20 +00:00