summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDirk Engling <erdgeist@erdgeist.org>2024-04-03 23:08:17 +0200
committerDirk Engling <erdgeist@erdgeist.org>2024-04-03 23:08:17 +0200
commit959e0912a16678f996a3fb6ca4bceb2efff4b1ce (patch)
treef0d4271491db397d7f200ccb9eac35502c6168bc
parent7c3279a02891a4fa78f5345b745eee4ee5379100 (diff)
Bind dual stack by default
-rw-r--r--Makefile3
-rw-r--r--opentracker.c3
-rw-r--r--ot_stats.c19
-rw-r--r--proxy.c1
4 files changed, 12 insertions, 14 deletions
diff --git a/Makefile b/Makefile
index e3301a5..fcae353 100644
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,7 @@ LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
20BINDIR?=$(PREFIX)/bin 20BINDIR?=$(PREFIX)/bin
21STRIP?=strip 21STRIP?=strip
22 22
23#FEATURES+=-DWANT_V6 23#FEATURES+=-DWAND_V4_ONLY
24
25#FEATURES+=-DWANT_ACCESSLIST_BLACK 24#FEATURES+=-DWANT_ACCESSLIST_BLACK
26#FEATURES+=-DWANT_ACCESSLIST_WHITE 25#FEATURES+=-DWANT_ACCESSLIST_WHITE
27#FEATURES+=-DWANT_DYNAMIC_ACCESSLIST 26#FEATURES+=-DWANT_DYNAMIC_ACCESSLIST
diff --git a/opentracker.c b/opentracker.c
index 78cafc3..9f99363 100644
--- a/opentracker.c
+++ b/opentracker.c
@@ -613,9 +613,8 @@ int main( int argc, char **argv ) {
613 char * statefile = 0; 613 char * statefile = 0;
614 614
615 memset( serverip, 0, sizeof(ot_ip6) ); 615 memset( serverip, 0, sizeof(ot_ip6) );
616#ifndef WANT_V6 616#ifdef WANT_V4_ONLY
617 serverip[10]=serverip[11]=-1; 617 serverip[10]=serverip[11]=-1;
618 noipv6=1;
619#endif 618#endif
620 619
621#ifdef WANT_DEV_RANDOM 620#ifdef WANT_DEV_RANDOM
diff --git a/ot_stats.c b/ot_stats.c
index b3cc48a..2d45346 100644
--- a/ot_stats.c
+++ b/ot_stats.c
@@ -73,13 +73,13 @@ static time_t ot_start_time;
73#define __LDR(P,D) ((__BYTE((P),(D))>>__SHFT((D)))&__MSK) 73#define __LDR(P,D) ((__BYTE((P),(D))>>__SHFT((D)))&__MSK)
74#define __STR(P,D,V) __BYTE((P),(D))=(__BYTE((P),(D))&~(__MSK<<__SHFT((D))))|((V)<<__SHFT((D))) 74#define __STR(P,D,V) __BYTE((P),(D))=(__BYTE((P),(D))&~(__MSK<<__SHFT((D))))|((V)<<__SHFT((D)))
75 75
76//#ifdef WANT_V6 76#if 0
77//#define STATS_NETWORK_NODE_MAXDEPTH (68-STATS_NETWORK_NODE_BITWIDTH) 77// XXX
78//#define STATS_NETWORK_NODE_LIMIT (48-STATS_NETWORK_NODE_BITWIDTH) 78#define STATS_NETWORK_NODE_MAXDEPTH (68-STATS_NETWORK_NODE_BITWIDTH)
79//#else 79#define STATS_NETWORK_NODE_LIMIT (48-STATS_NETWORK_NODE_BITWIDTH)
80#endif
80#define STATS_NETWORK_NODE_MAXDEPTH (28-STATS_NETWORK_NODE_BITWIDTH) 81#define STATS_NETWORK_NODE_MAXDEPTH (28-STATS_NETWORK_NODE_BITWIDTH)
81#define STATS_NETWORK_NODE_LIMIT (24-STATS_NETWORK_NODE_BITWIDTH) 82#define STATS_NETWORK_NODE_LIMIT (24-STATS_NETWORK_NODE_BITWIDTH)
82//#endif
83 83
84typedef union stats_network_node stats_network_node; 84typedef union stats_network_node stats_network_node;
85union stats_network_node { 85union stats_network_node {
@@ -202,9 +202,10 @@ static size_t stats_return_busy_networks( char * reply, stats_network_node *tree
202 for( i=amount-1; i>=0; --i) { 202 for( i=amount-1; i>=0; --i) {
203 if( scores[i] ) { 203 if( scores[i] ) {
204 r += sprintf( r, "%08zd: ", scores[i] ); 204 r += sprintf( r, "%08zd: ", scores[i] );
205#ifdef WANT_V6 205//#ifdef WANT_V6
206 r += fmt_ip6c( r, networks[i] ); 206 r += fmt_ip6c( r, networks[i] );
207#else 207#if 0
208 // XXX
208 r += fmt_ip4( r, networks[i]); 209 r += fmt_ip4( r, networks[i]);
209#endif 210#endif
210 *r++ = '\n'; 211 *r++ = '\n';
@@ -675,9 +676,9 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
675 *peerid_hex=0; 676 *peerid_hex=0;
676 } 677 }
677 678
678#ifdef WANT_V6
679 ip_readable[ fmt_ip6c( ip_readable, (char*)&ws->peer ) ] = 0; 679 ip_readable[ fmt_ip6c( ip_readable, (char*)&ws->peer ) ] = 0;
680#else 680#if 0
681 /* XXX */
681 ip_readable[ fmt_ip4( ip_readable, (char*)&ws->peer ) ] = 0; 682 ip_readable[ fmt_ip4( ip_readable, (char*)&ws->peer ) ] = 0;
682#endif 683#endif
683 syslog( LOG_INFO, "time=%s event=completed info_hash=%s peer_id=%s ip=%s", timestring, hash_hex, peerid_hex, ip_readable ); 684 syslog( LOG_INFO, "time=%s event=completed info_hash=%s peer_id=%s ip=%s", timestring, hash_hex, peerid_hex, ip_readable );
diff --git a/proxy.c b/proxy.c
index 619b08a..0270073 100644
--- a/proxy.c
+++ b/proxy.c
@@ -558,7 +558,6 @@ int main( int argc, char **argv ) {
558#else 558#else
559 g_tracker_id = random(); 559 g_tracker_id = random();
560#endif 560#endif
561 noipv6=1;
562 561
563 while( scanon ) { 562 while( scanon ) {
564 switch( getopt( argc, argv, ":l:c:L:h" ) ) { 563 switch( getopt( argc, argv, ":l:c:L:h" ) ) {