From f8017bac9afdb84424fb70b135ed00522d3907d9 Mon Sep 17 00:00:00 2001 From: Dirk Koopman Date: Sat, 14 Jan 2023 19:29:13 +0000 Subject: [PATCH] fix route promoted PC11s so that the PC61 are sent! --- Changes | 3 +++ perl/DXProtHandle.pm | 9 ++++++--- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/Changes b/Changes index 902e0707..9c6ffd41 100644 --- a/Changes +++ b/Changes @@ -1,3 +1,6 @@ +14Jan23======================================================================= +1. Fixed route PC11 promotions so that a new PC61 is actually generated and + also sent instead of the original PC11 (to PC61 capable nodes). 13Jan23======================================================================= 1. Periodically store Routing tables and, if they are young enough (def: 3hrs) autotically restore them on restart of the node. This will short circuit diff --git a/perl/DXProtHandle.pm b/perl/DXProtHandle.pm index 22c82ea4..8c62e392 100644 --- a/perl/DXProtHandle.pm +++ b/perl/DXProtHandle.pm @@ -317,13 +317,16 @@ sub handle_11 # can we promote this to a PC61? my $r = Route::User::get($spot[4]); # find spotter - if ($r && $r->ip) { # do we have an ip addres + if ($r && $r->ip) { # do we have an ip address $pcno = 61; $pc->[0] = 'PC61'; - $pc->[7] = $spot[14] = $r->ip; + my $hops = $pc->[8]; + $pc->[8] = $spot[14] = $r->ip; ++$rpc11_to_61; my $percent = $pc11_rx ? $rpc11_to_61 * 100 / $pc11_rx : 0; dbg(sprintf("PROMOTED ROUTE $self->{call}: pc11 $key PROMOTED to pc61 with IP $spot[14] pc61: $pc61_rx pc11: $pc11_rx route->pc61 $rpc11_to_61 (%0.1f%%)", $percent)) if isdbg("pc11"); + $line = join '^', @$pc, $hops, '~'; + dbg("CHANGED saved key: $key PC11 line to $line") if isdbg('pc11'); delete $pc11_saved{$key}; } @@ -356,7 +359,7 @@ sub handle_11 $ip =~ s/^::ffff://; if (DXCIDR::find($ip)) { dbg($line) if isdbg('nologchan'); - dbg("PCPROT: $ip in badip list, dropped"); + dbg("PCPROT: PC61 $ip in badip list, dropped"); return; } } -- 2.43.0