Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
udp_open_promisc() calls udp_open_common() with peer==NULL.
  • Loading branch information
Michael Brown committed Nov 28, 2007
1 parent 3b1efba commit 423e9d7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/net/udp.c
Expand Up @@ -89,7 +89,7 @@ static int udp_bind ( struct udp_connection *udp, unsigned int port ) {
* Open a UDP connection
*
* @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 promisc Socket is promiscuous
* @ret rc Return status code
Expand All @@ -109,7 +109,8 @@ static int udp_open_common ( struct xfer_interface *xfer,
return -ENOMEM;
DBGC ( udp, "UDP %p allocated\n", udp );
xfer_init ( &udp->xfer, &udp_xfer_operations, &udp->refcnt );
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );
if ( st_peer )
memcpy ( &udp->peer, st_peer, sizeof ( udp->peer ) );

/* Bind to local port */
if ( ! promisc ) {
Expand Down

0 comments on commit 423e9d7

Please sign in to comment.