]> git.ipfire.org Git - thirdparty/opentracker.git/commitdiff
Bind dual stack by default
authorDirk Engling <erdgeist@erdgeist.org>
Wed, 3 Apr 2024 21:08:17 +0000 (23:08 +0200)
committerDirk Engling <erdgeist@erdgeist.org>
Wed, 3 Apr 2024 21:08:17 +0000 (23:08 +0200)
Makefile
opentracker.c
ot_stats.c
proxy.c

index e3301a5980e4c9d6e6e61859421fa0a990e73476..fcae35317f6b8f07244aeb6276dffac1160435da 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -20,8 +20,7 @@ LIBOWFAT_LIBRARY=$(PREFIX)/libowfat
 BINDIR?=$(PREFIX)/bin
 STRIP?=strip
 
-#FEATURES+=-DWANT_V6
-
+#FEATURES+=-DWAND_V4_ONLY
 #FEATURES+=-DWANT_ACCESSLIST_BLACK
 #FEATURES+=-DWANT_ACCESSLIST_WHITE
 #FEATURES+=-DWANT_DYNAMIC_ACCESSLIST
index 78cafc3ec87b5d02c1e05f8ee0f5a746ec842dfc..9f99363a073d15315cefe33b83cca2dfb92f7369 100644 (file)
@@ -613,9 +613,8 @@ int main( int argc, char **argv ) {
   char * statefile = 0;
 
   memset( serverip, 0, sizeof(ot_ip6) );
-#ifndef WANT_V6
+#ifdef WANT_V4_ONLY
   serverip[10]=serverip[11]=-1;
-  noipv6=1;
 #endif
 
 #ifdef WANT_DEV_RANDOM
index b3cc48a0c0f301304903fb0ecffbce9a84f78748..2d45346571047440daf992fb24456665cde58412 100644 (file)
@@ -73,13 +73,13 @@ static time_t ot_start_time;
 #define __LDR(P,D)   ((__BYTE((P),(D))>>__SHFT((D)))&__MSK)
 #define __STR(P,D,V)   __BYTE((P),(D))=(__BYTE((P),(D))&~(__MSK<<__SHFT((D))))|((V)<<__SHFT((D)))
 
-//#ifdef WANT_V6
-//#define STATS_NETWORK_NODE_MAXDEPTH  (68-STATS_NETWORK_NODE_BITWIDTH)
-//#define STATS_NETWORK_NODE_LIMIT     (48-STATS_NETWORK_NODE_BITWIDTH)
-//#else
+#if 0
+// XXX
+#define STATS_NETWORK_NODE_MAXDEPTH  (68-STATS_NETWORK_NODE_BITWIDTH)
+#define STATS_NETWORK_NODE_LIMIT     (48-STATS_NETWORK_NODE_BITWIDTH)
+#endif
 #define STATS_NETWORK_NODE_MAXDEPTH  (28-STATS_NETWORK_NODE_BITWIDTH)
 #define STATS_NETWORK_NODE_LIMIT     (24-STATS_NETWORK_NODE_BITWIDTH)
-//#endif
 
 typedef union stats_network_node stats_network_node;
 union stats_network_node {
@@ -202,9 +202,10 @@ static size_t stats_return_busy_networks( char * reply, stats_network_node *tree
   for( i=amount-1; i>=0; --i) {
     if( scores[i] ) {
       r += sprintf( r, "%08zd: ", scores[i] );
-#ifdef WANT_V6
+//#ifdef WANT_V6
       r += fmt_ip6c( r, networks[i] );
-#else
+#if 0
+    // XXX
       r += fmt_ip4( r, networks[i]);
 #endif
       *r++ = '\n';
@@ -675,9 +676,9 @@ void stats_issue_event( ot_status_event event, PROTO_FLAG proto, uintptr_t event
           *peerid_hex=0;
         }
 
-#ifdef WANT_V6
         ip_readable[ fmt_ip6c( ip_readable, (char*)&ws->peer ) ] = 0;
-#else
+#if 0
+        /* XXX */
         ip_readable[ fmt_ip4( ip_readable, (char*)&ws->peer ) ] = 0;
 #endif
         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 619b08a9046f051d67f8b3fea22f493ef5ee2e12..0270073b6c785c4be58bb37097e884ee1550452b 100644 (file)
--- a/proxy.c
+++ b/proxy.c
@@ -558,7 +558,6 @@ int main( int argc, char **argv ) {
 #else
   g_tracker_id = random();
 #endif
-  noipv6=1;
 
   while( scanon ) {
     switch( getopt( argc, argv, ":l:c:L:h" ) ) {