summaryrefslogtreecommitdiffstats
path: root/src/net/udp
diff options
context:
space:
mode:
authorMichael Brown2009-03-30 14:24:56 +0200
committerMichael Brown2009-03-30 14:24:56 +0200
commit323cdf8c4c510fc6da081b96994d0131c11a29dd (patch)
tree268806d5d1de34a96a446356a065057b060c7282 /src/net/udp
parent[bzimage] Support old (pre-2.00 bootloader) Linux kernel formats (diff)
downloadipxe-323cdf8c4c510fc6da081b96994d0131c11a29dd.tar.gz
ipxe-323cdf8c4c510fc6da081b96994d0131c11a29dd.tar.xz
ipxe-323cdf8c4c510fc6da081b96994d0131c11a29dd.zip
[xfer] Implement xfer_vreopen() to properly handle redirections
When handling a redirection event, we need to close the existing connection before opening the new connection.
Diffstat (limited to 'src/net/udp')
-rw-r--r--src/net/udp/dhcp.c2
-rw-r--r--src/net/udp/dns.c2
-rw-r--r--src/net/udp/slam.c4
-rw-r--r--src/net/udp/tftp.c4
4 files changed, 6 insertions, 6 deletions
diff --git a/src/net/udp/dhcp.c b/src/net/udp/dhcp.c
index 97e64617..289e41ad 100644
--- a/src/net/udp/dhcp.c
+++ b/src/net/udp/dhcp.c
@@ -1107,7 +1107,7 @@ static int dhcp_deliver_iob ( struct xfer_interface *xfer,
/** DHCP data transfer interface operations */
static struct xfer_interface_operations dhcp_xfer_operations = {
.close = ignore_xfer_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = dhcp_deliver_iob,
diff --git a/src/net/udp/dns.c b/src/net/udp/dns.c
index a498aefc..c1da454b 100644
--- a/src/net/udp/dns.c
+++ b/src/net/udp/dns.c
@@ -459,7 +459,7 @@ static void dns_xfer_close ( struct xfer_interface *socket, int rc ) {
/** DNS socket operations */
static struct xfer_interface_operations dns_socket_operations = {
.close = dns_xfer_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = xfer_deliver_as_raw,
diff --git a/src/net/udp/slam.c b/src/net/udp/slam.c
index 6add99bc..71043f45 100644
--- a/src/net/udp/slam.c
+++ b/src/net/udp/slam.c
@@ -614,7 +614,7 @@ static void slam_socket_close ( struct xfer_interface *socket, int rc ) {
/** SLAM unicast socket data transfer operations */
static struct xfer_interface_operations slam_socket_operations = {
.close = slam_socket_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = slam_socket_deliver,
@@ -640,7 +640,7 @@ static void slam_mc_socket_close ( struct xfer_interface *mc_socket, int rc ){
/** SLAM multicast socket data transfer operations */
static struct xfer_interface_operations slam_mc_socket_operations = {
.close = slam_mc_socket_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = slam_mc_socket_deliver,
diff --git a/src/net/udp/tftp.c b/src/net/udp/tftp.c
index 19525f79..be7e58af 100644
--- a/src/net/udp/tftp.c
+++ b/src/net/udp/tftp.c
@@ -934,7 +934,7 @@ static int tftp_socket_deliver_iob ( struct xfer_interface *socket,
/** TFTP socket operations */
static struct xfer_interface_operations tftp_socket_operations = {
.close = ignore_xfer_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = tftp_socket_deliver_iob,
@@ -961,7 +961,7 @@ static int tftp_mc_socket_deliver_iob ( struct xfer_interface *mc_socket,
/** TFTP multicast socket operations */
static struct xfer_interface_operations tftp_mc_socket_operations = {
.close = ignore_xfer_close,
- .vredirect = xfer_vopen,
+ .vredirect = xfer_vreopen,
.window = unlimited_xfer_window,
.alloc_iob = default_xfer_alloc_iob,
.deliver_iob = tftp_mc_socket_deliver_iob,