mirror of
https://github.com/9fans/plan9port.git
synced 2025-01-27 11:52:03 +00:00
allow broadcast
This commit is contained in:
parent
821fff983b
commit
74f9b0c62c
1 changed files with 2 additions and 0 deletions
|
@ -98,6 +98,8 @@ p9dial(char *addr, char *local, char *dummy2, int *dummy3)
|
|||
free(buf);
|
||||
}
|
||||
|
||||
n = 1;
|
||||
setsockopt(s, SOL_SOCKET, SO_BROADCAST, &n, sizeof n);
|
||||
if(connect(s, (struct sockaddr*)&sa, sizeof sa) < 0){
|
||||
close(s);
|
||||
return -1;
|
||||
|
|
Loading…
Reference in a new issue