summaryrefslogtreecommitdiffstats
path: root/src/core/xfer.c
diff options
context:
space:
mode:
authorMichael Brown2010-06-22 20:12:40 +0200
committerMichael Brown2010-06-22 20:12:40 +0200
commit65bc070b05a2ae43a45d3fdf4a2579280f1623cc (patch)
treeb78fcd42efba7da0077f94df7493c9937c8109fb /src/core/xfer.c
parent[interface] Convert all data-xfer interfaces to generic interfaces (diff)
downloadipxe-65bc070b05a2ae43a45d3fdf4a2579280f1623cc.tar.gz
ipxe-65bc070b05a2ae43a45d3fdf4a2579280f1623cc.tar.xz
ipxe-65bc070b05a2ae43a45d3fdf4a2579280f1623cc.zip
[interface] Allow for non-pass-through interface methods
xfer_vredirect() should not be allowed to propagate to a pass-through interface. For example, when an HTTPS connection is opened, the redirect message should cause the TLS layer to reopen the TCP socket, rather than causing the HTTP layer to disconnect from the TLS layer. Fix by allowing for non-pass-through interface methods, and setting xfer_vredirect() to be one such method. This is slightly ugly, in that it complicates the notion of an interface method call by adding a "pass-through" / "non-pass-through" piece of metadata. However, the only current user of xfer_vredirect() is iscsi.c, which uses it only because we don't yet have an ioctl()-style call for retrieving the underlying socket address. The new interface infrastructure allows for such a call to be created, at which time this sole user of xfer_vredirect() can be removed, xfer_vredirect() can cease to be an interface method and become simply a wrapper around xfer_vreopen(), and the concept of a non-pass-through interface method can be reverted. Signed-off-by: Michael Brown <mcb30@ipxe.org>
Diffstat (limited to 'src/core/xfer.c')
-rw-r--r--src/core/xfer.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/core/xfer.c b/src/core/xfer.c
index 057ab8b3..dce245f9 100644
--- a/src/core/xfer.c
+++ b/src/core/xfer.c
@@ -56,7 +56,7 @@ static struct xfer_metadata dummy_metadata;
int xfer_vredirect ( struct interface *intf, int type, va_list args ) {
struct interface *dest;
xfer_vredirect_TYPE ( void * ) *op =
- intf_get_dest_op ( intf, xfer_vredirect, &dest );
+ intf_get_dest_op_no_passthru ( intf, xfer_vredirect, &dest );
void *object = intf_object ( dest );
int rc;