projects
/
umurmur.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
97729da
)
Added socket errno EPROTONOSUPPORT to socket support check in checkIPversions()
author
Marcus Ball
<marcus@marcusball.me>
Fri, 19 Jun 2015 20:08:58 +0000
(16:08 -0400)
committer
Marcus Ball
<marcus@marcusball.me>
Fri, 19 Jun 2015 20:08:58 +0000
(16:08 -0400)
src/server.c
patch
|
blob
|
history
diff --git
a/src/server.c
b/src/server.c
index e83a68ab7f0b3bb3b895687647e9681a2c5821cd..1a586324b0af1dbc1bc9dc09327efe811929ea7d 100644
(file)
--- a/
src/server.c
+++ b/
src/server.c
@@
-67,13
+67,13
@@
void checkIPversions()
int testsocket = -1;
testsocket = socket(PF_INET, SOCK_STREAM, 0);
int testsocket = -1;
testsocket = socket(PF_INET, SOCK_STREAM, 0);
- hasv4 = (errno == EAFNOSUPPORT) ? false : true;
+ hasv4 = (errno == EAFNOSUPPORT
|| errno == EPROTONOSUPPORT
) ? false : true;
if (!(testsocket < 0)) close(testsocket);
testsocket = socket(PF_INET6, SOCK_STREAM, 0);
if (!(testsocket < 0)) close(testsocket);
testsocket = socket(PF_INET6, SOCK_STREAM, 0);
- hasv6 = (errno == EAFNOSUPPORT) ? false : true;
+ hasv6 = (errno == EAFNOSUPPORT
|| errno == EPROTONOSUPPORT
) ? false : true;
if (!(testsocket < 0)) close(testsocket);
if (!(testsocket < 0)) close(testsocket);
-
+
if(!hasv4)
{
Log_info("IPv4 is not supported by this system");
if(!hasv4)
{
Log_info("IPv4 is not supported by this system");
@@
-85,7
+85,6
@@
void checkIPversions()
Log_info("IPv6 is not supported by this system");
nofServerSocks -= 2;
}
Log_info("IPv6 is not supported by this system");
nofServerSocks -= 2;
}
-
if(nofServerSocks == 0)
{
Log_fatal("Neither IPv4 nor IPv6 are supported by this system");
if(nofServerSocks == 0)
{
Log_fatal("Neither IPv4 nor IPv6 are supported by this system");