Skip to content

Commit a34911f

Browse files
committed
UDP bind to any (ignore local ip)
1 parent 01f306d commit a34911f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

peripherals/nic/w5100_socket.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ w5100_socket_bind_port( nic_w5100_t *self, nic_w5100_socket_t *socket )
226226
memset( &sa, 0, sizeof(sa) );
227227
sa.sin_family = AF_INET;
228228
memcpy( &sa.sin_port, socket->port, 2 );
229-
memcpy( &sa.sin_addr.s_addr, self->sip, 4 );
229+
sa.sin_addr.s_addr = INADDR_ANY;
230230

231231
nic_w5100_debug( "w5100: attempting to bind socket %d to %s:%d\n", socket->id, inet_ntoa(sa.sin_addr), ntohs(sa.sin_port) );
232232
if( bind( socket->fd, (struct sockaddr*)&sa, sizeof(sa) ) == -1 ) {

0 commit comments

Comments
 (0)