Add support to bind to interface (-Di / -Do) via SO_BINDTODEVICE

This commit is contained in:
z3APA3A committed 2017-08-14 18:22:15 +03:00
1 parent 6010190940
commit b17b36cbce
3 files changed
+25 -2

No files matched your search

+3 -1
View File
@@ -714,7 +714,9 @@ int doconnect(struct clientparam * param){
#endif
}
#endif
#ifdef SO_BINDTODEVICE
if(param->srv->obindtodevice) so._setsockopt(param->remsock, SOL_SOCKET, SO_BINDTODEVICE, param->srv->obindtodevice, strlen(param->srv->obindtodevice) + 1);
#endif
if(SAISNULL(&param->sinsl)){
#ifndef NOIPV6
if(*SAFAMILY(&param->sinsr) == AF_INET6) param->sinsl = param->srv->extsa6;