mirror of https://github.com/ipxe/ipxe.git
udp_open_promisc() calls udp_open_common() with peer==NULL.
parent
3b1efba864
commit
423e9d72f3
|
@ -89,7 +89,7 @@ static int udp_bind ( struct udp_connection *udp, unsigned int port ) {
|
||||||
* Open a UDP connection
|
* Open a UDP connection
|
||||||
*
|
*
|
||||||
* @v xfer Data transfer interface
|
* @v xfer Data transfer interface
|
||||||
* @v peer Peer socket address
|
* @v peer Peer socket address, or NULL
|
||||||
* @v local Local socket address, or NULL
|
* @v local Local socket address, or NULL
|
||||||
* @v promisc Socket is promiscuous
|
* @v promisc Socket is promiscuous
|
||||||
* @ret rc Return status code
|
* @ret rc Return status code
|
||||||
|
@ -109,6 +109,7 @@ static int udp_open_common ( struct xfer_interface *xfer,
|
||||||
return -ENOMEM;
|
return -ENOMEM;
|
||||||
DBGC ( udp, "UDP %p allocated\n", udp );
|
DBGC ( udp, "UDP %p allocated\n", udp );
|
||||||
xfer_init ( &udp->xfer, &udp_xfer_operations, &udp->refcnt );
|
xfer_init ( &udp->xfer, &udp_xfer_operations, &udp->refcnt );
|
||||||
|
if ( st_peer )
|
||||||
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );
|
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );
|
||||||
|
|
||||||
/* Bind to local port */
|
/* Bind to local port */
|
||||||
|
|
Loading…
Reference in New Issue