Skip to content
Snippets Groups Projects
Commit 7f06532a authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Only set IPV6_ONLY if it's #defined.

parent 7dea65c3
No related branches found
No related tags found
No related merge requests found
......@@ -60,8 +60,10 @@ int set_socket_options(scfg_t* cfg, SOCKET sock, const char* protocol, char* err
iniFileName(cfgfile,sizeof(cfgfile),cfg->ctrl_dir,"sockopts.ini");
if((fp=iniOpenFile(cfgfile,FALSE))==NULL) {
int optval = 1;
#if defined(IPPROTO_IPV6) && defined(IPV6_V6ONLY)
// Set the only sane choice...
setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY, (void *)&optval, sizeof(optval));
#endif
return(0);
}
list=iniReadFile(fp);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment