aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--efi/tcp.c3
-rw-r--r--efi/udp.c6
2 files changed, 3 insertions, 6 deletions
diff --git a/efi/tcp.c b/efi/tcp.c
index f041b677..274456d0 100644
--- a/efi/tcp.c
+++ b/efi/tcp.c
@@ -56,8 +56,7 @@ int core_tcp_connect(struct pxe_pvt_inode *socket, uint32_t ip, uint16_t port)
memset(&tdata, 0, sizeof(tdata));
ap = &tdata.AccessPoint;
- memcpy(&ap->StationAddress, &IPInfo.myip, sizeof(IPInfo.myip));
- memcpy(&ap->SubnetMask, &IPInfo.netmask, sizeof(IPInfo.netmask));
+ ap->UseDefaultAddress = TRUE;
memcpy(&ap->RemoteAddress, &ip, sizeof(ip));
ap->RemotePort = port;
ap->ActiveFlag = TRUE; /* Initiate active open */
diff --git a/efi/udp.c b/efi/udp.c
index b1cae6f7..14817366 100644
--- a/efi/udp.c
+++ b/efi/udp.c
@@ -112,8 +112,7 @@ void core_udp_connect(struct pxe_pvt_inode *socket, uint32_t ip,
/* Re-use the existing local port number */
udata.StationPort = socket->net.efi.localport;
- memcpy(&udata.StationAddress, &IPInfo.myip, sizeof(IPInfo.myip));
- memcpy(&udata.SubnetMask, &IPInfo.netmask, sizeof(IPInfo.netmask));
+ udata.UseDefaultAddress = TRUE;
memcpy(&udata.RemoteAddress, &ip, sizeof(ip));
udata.RemotePort = port;
udata.AcceptPromiscuous = TRUE;
@@ -336,8 +335,7 @@ void core_udp_sendto(struct pxe_pvt_inode *socket, const void *data,
/* Re-use the existing local port number */
udata.StationPort = socket->net.efi.localport;
- memcpy(&udata.StationAddress, &IPInfo.myip, sizeof(IPInfo.myip));
- memcpy(&udata.SubnetMask, &IPInfo.netmask, sizeof(IPInfo.netmask));
+ udata.UseDefaultAddress = TRUE;
memcpy(&udata.RemoteAddress, &ip, sizeof(ip));
udata.RemotePort = port;
udata.AcceptPromiscuous = TRUE;