... | ... |
@@ -565,12 +565,17 @@ int fix_all_socket_lists() |
565 | 565 |
if (add_interfaces(0, AF_INET, 0, PROTO_UDP, &udp_listen)==0){ |
566 | 566 |
/* if ok, try to add the others too */ |
567 | 567 |
#ifdef USE_TCP |
568 |
- if (add_interfaces(0, AF_INET, 0, PROTO_TCP, &tcp_listen)!=0) |
|
569 |
- goto error; |
|
568 |
+ if (!tcp_disable){ |
|
569 |
+ if (add_interfaces(0, AF_INET, 0, PROTO_TCP, &tcp_listen)!=0) |
|
570 |
+ goto error; |
|
570 | 571 |
#ifdef USE_TLS |
571 |
- if (add_interfaces(0, AF_INET, 0, PROTO_TLS, &tls_listen)!=0) |
|
572 |
- goto error; |
|
572 |
+ if (!tls_disable){ |
|
573 |
+ if (add_interfaces(0, AF_INET, 0, PROTO_TLS, |
|
574 |
+ &tls_listen)!=0) |
|
575 |
+ goto error; |
|
576 |
+ } |
|
573 | 577 |
#endif |
578 |
+ } |
|
574 | 579 |
#endif |
575 | 580 |
}else{ |
576 | 581 |
/* if error fall back to get hostname */ |
... | ... |
@@ -68,14 +68,14 @@ static inline int next_proto(unsigned short proto) |
68 | 68 |
return PROTO_UDP; |
69 | 69 |
case PROTO_UDP: |
70 | 70 |
#ifdef USE_TCP |
71 |
- return PROTO_TCP; |
|
71 |
+ return (tcp_disable)?0:PROTO_TCP; |
|
72 | 72 |
#else |
73 | 73 |
return 0; |
74 | 74 |
#endif |
75 | 75 |
#ifdef USE_TCP |
76 | 76 |
case PROTO_TCP: |
77 | 77 |
#ifdef USE_TLS |
78 |
- return PROTO_TLS; |
|
78 |
+ return (tls_disable)?0:PROTO_TLS; |
|
79 | 79 |
#else |
80 | 80 |
return 0; |
81 | 81 |
#endif |