summaryrefslogtreecommitdiffstats
path: root/src/net/tcp
Commit message (Collapse)AuthorAgeFilesLines
* [iSCSI] Add support for mutual CHAPMichael Brown2008-08-111-45/+266
| | | | Allow initiator to verify target authentication using CHAP.
* [ftp] Terminate processing after receiving an errorSergey Vlasov2008-07-301-0/+1
| | | | | | | | | When an error reply (not 1xx, 2xx or 3xx) was received, ftp_reply() invoked ftp_done() to close connections, but did not return, and the rest of code in this function could try to send commands to the closed control connection. Signed-off-by: Sergey Vlasov <vsu@altlinux.ru>
* [ftp] Cope with RETR completion prior to all data receivedMichael Brown2008-07-301-15/+33
| | | | | | | | | | | | Based on a patch contributed by Sergey Vlasov <vsu@altlinux.ru> : In my testing with "qemu -net user" the 226 response to RETR was often received earlier than final packets of the data connection; this caused the received file to become truncated without any error indication. Fix this by adding an intermediate state FTP_TRANSFER between FTP_RETR and FTP_QUIT, so that the transfer is considered to be complete only when both the end of data connection is encountered and the final reply to the RETR command is received.
* [iSCSI] Produce meaningful errors on login failureMichael Brown2008-06-041-3/+34
| | | | | | | | Return the most appropriate of EACCES, EPERM, ENODEV, ENOTSUP, EIO or EINVAL depending on the exact error returned by the target, rather than just always returning EPERM. Also, ensure that error strings exist for these errors.
* [iSCSI] Offer CHAP authentication only if we have a username and passwordMichael Brown2008-04-241-4/+5
| | | | | | | | | | | | | | | | Some EMC targets will fail if we advertise that we can authenticate with CHAP, but the target is configured to allow unauthenticated access to that target. We advertise AuthMethod=CHAP,None; the target should (I think) select AuthMethod=None for unprotected targets. IETD does this, but an EMC Celerra NS83 doesn't. Fix by offering only AuthMethod=None if the user hasn't supplied a username and password; this means that we won't be offering CHAP authentication unless the user is expecting to use it (in which case the target is presumably configured appropriately). Many thanks to Alessandro Iurlano <alessandro.iurlano@gmail.com> for reporting and helping to diagnose this problem.
* [http] gPXE is a HTTP/1.0 client, not a HTTP/1.1 clientH. Peter Anvin2008-03-311-1/+1
| | | | | | | | | | | | | | | gPXE is not compliant with the HTTP/1.1 specification (RFC 2616), since it lacks support for "Transfer-Encoding: chunked". gPXE is, however, compliant with the HTTP/1.0 specification (RFC 1945), which does not require "Transfer-Encoding: chunked" to be supported. The only HTTP/1.1 feature that gPXE uses is the "Host:" header, but servers universally accept that one from HTTP/1.0 clients as an optional extension (it is obligatory for HTTP/1.1). gPXE does not, for example, appear to support connection caching. Advertising as a HTTP/1.0 client will typically make the server close the connection immediately upon sending the last data, which is actually beneficial if we aren't going to keep the connection alive anyway.
* [Settings] Remove assumption that all settings have DHCP tag valuesMichael Brown2008-03-251-11/+19
| | | | | | | | | | | | Allow for settings to be described by something other than a DHCP option tag if desirable. Currently used only for the MAC address setting. Separate out fake DHCP packet creation code from dhcp.c to fakedhcp.c. Remove notion of settings from dhcppkt.c. Rationalise dhcp.c to use settings API only for final registration of the DHCP options, rather than using {store,fetch}_setting throughout.
* [Settings] DHCP is now working using the new settings API.Michael Brown2008-03-211-2/+4
|
* [Settings] Introduce settings applicators.Michael Brown2008-03-211-56/+85
| | | | | | | Convert DHCP option applicators in dns.c and iscsi.c to settings applicators. Kill off DHCP option applicators.
* Fixes for EqualLogic iSCSI targets:Michael Brown2008-02-071-7/+19
| | | | | | | Allow port numbers in iSCSI redirection. Wait for SCSI status, not just the final data-in (which may be followed by an explicit SCSI Response PDU if the S bit is not set).
* Make seek information part of the xfer metadata, rather than an entirelyMichael Brown2008-01-083-6/+0Star
| | | | | | | separate xfer method. Add missing .alloc_iob entries to several xfer_interface_operations structures.
* Fix off-by-one error (discovered by Shao Miller).Michael Brown2008-01-071-1/+1
|
* Various warnings fixups for OpenBSD with gcc-3.3.5.Michael Brown2007-12-071-1/+1
|
* Work around a bug in the OpenSolaris iSCSI target.Michael Brown2007-11-051-3/+10
| | | | | | | | | | | | | | | We didn't specify values for MaxRecvDataSegmentLength and MaxBurstLength (to save space, since we were happy with the RFC-defined default values of 8kB and 256kB respectively). However, the OpenSolaris target (incorrectly) assumes default values of zero for these parameters. The upshot was that the OpenSolaris target would get stuck in an endless loop trying to send us the first 512-byte sector, zero bytes at a time, and would eventually run out of memory and core-dump. Fixed by explicitly specifying the default values for these two parameters.
* Allowed zero-cost enforced ordering of features in startup bannerMichael Brown2007-08-024-3/+6
| | | | | | list. Added FEATURE() macros to most relevant (non-driver) files.
* Use otherwise-useless byte in DHCP feature option as a version numberMichael Brown2007-08-023-1/+7
|
* Add FEATURE() macro, plus code to display features at startup time,Michael Brown2007-08-021-0/+3
| | | | | and generate DHCP options to indicate features to DHCP server (and to PXE NBPs).
* Allowed HTTPS to be a separately configurable feature.Michael Brown2007-07-302-13/+67
|
* TLS now working again.Michael Brown2007-07-301-9/+8Star
|
* Merge branch 'symcheck2'Michael Brown2007-07-281-1/+1
|\
| * make http_open staticHolger Lubitz2007-07-271-1/+1
| |
* | Prepare for iBFT merge when possible. iscsiboot.c contains a really,Michael Brown2007-07-261-18/+98
|/ | | | | | really ugly hack at present, but that doesn't hugely matter since I'm aiming to change the interface to iSCSI devices anyway within the next week.
* Added missing "static" declarationsMichael Brown2007-07-171-2/+2
|
* May be required in some disconnect scenariosMichael Brown2007-07-101-0/+1
|
* Add missing staticMichael Brown2007-07-091-1/+1
|
* Fix TX state machine and miscellaneous other bits.Michael Brown2007-07-091-38/+70
|
* Fix root-path parsing.Michael Brown2007-07-091-36/+35Star
|
* Ready to start testingMichael Brown2007-07-081-20/+24
|
* Code in place to use a hypothetical SCSI interface.Michael Brown2007-07-081-8/+23
|
* Everything except the SCSI interface should now be presentMichael Brown2007-07-081-38/+274
|
* iSCSI updated to use data-xfer interface on the socket side (TCP).Michael Brown2007-07-081-330/+379
| | | | SCSI interface not yet implemented.
* Separate the "is data ready" function of xfer_seek() into anMichael Brown2007-07-082-1/+6
| | | | | xfer_window() function, which can return a scalar rather than a boolean.
* Kill off unused request() method in data-xfer interface.Michael Brown2007-07-082-5/+0Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* convert to zallocHolger Lubitz2007-07-061-2/+1Star
|
* Switch compiler warning on tcp_open() to a #warningMichael Brown2007-07-051-0/+3
|
* Added missing line to set return status code.Michael Brown2007-07-031-0/+1
|
* Add concept of transfer metadata, to be used by UDP in order toMichael Brown2007-06-112-2/+6
| | | | implement sendto()/recvfrom() equivalents.
* Merge branch 'master' into mcb-tcp-xferMichael Brown2007-06-081-26/+1Star
|\
| * Move [v]ssnprintf() from iscsi.c into vsprintf.c; we need themMichael Brown2007-05-311-26/+1Star
| | | | | | | | elsewhere as well.
* | Should call ftp_done() if constructor fails.Michael Brown2007-05-291-0/+1
| |
* | Update HTTP to use data-xfer interface.Michael Brown2007-05-291-217/+254
| |
* | Updated FTP to use data-xfer API.Michael Brown2007-05-281-174/+206
|/
* Allow queries in GET requestsMichael Brown2007-02-011-5/+7
|
* Placeholder for TLS insertionMichael Brown2007-01-311-8/+19
|
* Changed to use the generic stream API.Michael Brown2007-01-313-113/+151
|
* Keep HTTP progress updated, and display a progress indicator during theMichael Brown2007-01-291-0/+4
| | | | download
* Use stdio.h instead of vsprintf.hMichael Brown2007-01-193-3/+3
|
* A working name resolution frameworkMichael Brown2007-01-181-9/+5Star
|
* Presize the download buffer when we see the Content-Length header;Michael Brown2007-01-181-0/+12
| | | | | this saves around 70us per received packet (which is around 50% of the overall packet processing time).