Fail if can not bind to device

This commit is contained in:
z3APA3A committed 2020-06-17 16:05:23 +03:00
1 parent 9eac5c13a8
commit 859713d10f
3 files changed
+30 -8

No files matched your search

+4 -1
View File
@@ -746,7 +746,10 @@ int doconnect(struct clientparam * param){
}
#endif
#ifdef SO_BINDTODEVICE
if(param->srv->obindtodevice) so._setsockopt(param->remsock, SOL_SOCKET, SO_BINDTODEVICE, param->srv->obindtodevice, strlen(param->srv->obindtodevice) + 1);
if(param->srv->obindtodevice) {
if(so._setsockopt(param->remsock, SOL_SOCKET, SO_BINDTODEVICE, param->srv->obindtodevice, strlen(param->srv->obindtodevice) + 1))
return 12;
}
#endif
if(SAISNULL(&param->sinsl)){
#ifndef NOIPV6