http://git.etherboot.org
/
people
/
mcb30
/
gpxe.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
3b1efba
)
udp_open_promisc() calls udp_open_common() with peer==NULL.
author
Michael Brown
<mcb30@etherboot.org>
Wed, 28 Nov 2007 11:56:14 +0000
(11:56 +0000)
committer
Michael Brown
<mcb30@etherboot.org>
Wed, 28 Nov 2007 11:56:14 +0000
(11:56 +0000)
src/net/udp.c
patch
|
blob
|
history
diff --git
a/src/net/udp.c
b/src/net/udp.c
index
b4cd8e6
..
fcd5732
100644
(file)
--- a/
src/net/udp.c
+++ b/
src/net/udp.c
@@
-89,7
+89,7
@@
static int udp_bind ( struct udp_connection *udp, unsigned int port ) {
* Open a UDP connection
*
* @v xfer Data transfer interface
* 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
* @v local Local socket address, or NULL
* @v promisc Socket is promiscuous
* @ret rc Return status code
@@
-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 );
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 ) {
/* Bind to local port */
if ( ! promisc ) {