summaryrefslogtreecommitdiffstats
path: root/sys/netipx/ipx_pcb.c
diff options
context:
space:
mode:
authorrwatson <rwatson@FreeBSD.org>2005-01-02 15:25:59 +0000
committerrwatson <rwatson@FreeBSD.org>2005-01-02 15:25:59 +0000
commit232fe9e06de6086ac1663d5e5f95b3a3597fed66 (patch)
tree481ad283ba3c3c798d8eb817dacd7d91f0bea735 /sys/netipx/ipx_pcb.c
parent1a1b431cbf2d694fd8f9f16ab0ea6bf4ce674dc9 (diff)
downloadFreeBSD-src-232fe9e06de6086ac1663d5e5f95b3a3597fed66.zip
FreeBSD-src-232fe9e06de6086ac1663d5e5f95b3a3597fed66.tar.gz
Eliminate XXX comments regarding allocation failures when retrieving
the peer address by using M_WAITOK in ipx_setpeeraddr() to prevent allocation failure. The socket reference used to reach these calls will prevent the ipxpcb from being released prematurely.
Diffstat (limited to 'sys/netipx/ipx_pcb.c')
-rw-r--r--sys/netipx/ipx_pcb.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/sys/netipx/ipx_pcb.c b/sys/netipx/ipx_pcb.c
index b697616..1c7edeb 100644
--- a/sys/netipx/ipx_pcb.c
+++ b/sys/netipx/ipx_pcb.c
@@ -301,13 +301,13 @@ ipx_setpeeraddr(ipxp, nam)
struct sockaddr **nam;
{
struct sockaddr_ipx *sipx, ssipx;
-
+
sipx = &ssipx;
- bzero((caddr_t)sipx, sizeof(*sipx));
+ bzero(sipx, sizeof(*sipx));
sipx->sipx_len = sizeof(*sipx);
sipx->sipx_family = AF_IPX;
sipx->sipx_addr = ipxp->ipxp_faddr;
- *nam = sodupsockaddr((struct sockaddr *)sipx, M_NOWAIT);
+ *nam = sodupsockaddr((struct sockaddr *)sipx, M_WAITOK);
}
struct ipxpcb *
OpenPOWER on IntegriCloud