mirror of
https://github.com/esp8266/Arduino.git
synced 2025-07-27 18:02:17 +03:00
emulation on host: fix binding from a particular interface (#7372)
allows to effectively use virtual interfaces (ifconfig eth0:1) with a different IP address
This commit is contained in:
@ -101,7 +101,7 @@ void WiFiServer::begin ()
|
||||
|
||||
server.sin_family = AF_INET;
|
||||
server.sin_port = htons(mockport);
|
||||
server.sin_addr.s_addr = htonl(INADDR_ANY);
|
||||
server.sin_addr.s_addr = htonl(global_source_address);
|
||||
if (bind(sock, (struct sockaddr*)&server, sizeof(server)) == -1)
|
||||
{
|
||||
perror(MOCK "bind()");
|
||||
|
Reference in New Issue
Block a user