Open zvpunry opened 3 years ago
It is easy to replicate, just create a wireguard interface and linhpsdr exits with the message:
discover: looking for HPSDR devices on wg0 discover: bound to wg0 discover: sendto socket failed for discovery_socket : Required key not available
The solution is to continue after ENOKEY errors, something like this:
diff --git a/protocol1_discovery.c b/protocol1_discovery.c index 7d833c7..43bf53e 100644 --- a/protocol1_discovery.c +++ b/protocol1_discovery.c @@ -117,7 +117,7 @@ static void discover(struct ifaddrs* iface) { if(sendto(discovery_socket,buffer,63,0,(struct sockaddr*)&to_addr,sizeof(to_addr))<0) { perror("discover: sendto socket failed for discovery_socket\n"); - if(errno!=EHOSTUNREACH && errno!=EADDRNOTAVAIL) { + if(errno!=EHOSTUNREACH && errno!=EADDRNOTAVAIL && errno!=ENOKEY) { exit(-1); } }
I think it is the easiest when you test it and edit your own source tree, so I don't need to push it somewhere.
I should have tested to run it with that change... there is copy&paste code in protocol2_discovery.c that also needs to be fixed.
It is easy to replicate, just create a wireguard interface and linhpsdr exits with the message:
The solution is to continue after ENOKEY errors, something like this:
I think it is the easiest when you test it and edit your own source tree, so I don't need to push it somewhere.