New feature: AKAMATCHFROMTO
This commit is contained in:
parent
5d0bf484fc
commit
eb75fd337c
@ -874,6 +874,10 @@ void MakeMsg(int mode, GMsg* omsg, bool ignore_replyto) {
|
||||
// ... but only if we did NOT change aka manually
|
||||
if(AA->Aka().addr.equals(AA->aka())) {
|
||||
Addr aka_addr = AA->Aka().addr;
|
||||
if (CFG->akamatchfromto)
|
||||
aka_addr = omsg->dest;
|
||||
else
|
||||
aka_addr = AA->Aka().addr;
|
||||
AkaMatch(&aka_addr, &omsg->orig);
|
||||
AA->SetAka(aka_addr);
|
||||
}
|
||||
|
@ -214,7 +214,12 @@ int AkaMatch(ftn_addr* match, const ftn_addr* addr) {
|
||||
for(a = CFG->aka.begin(), aka = 0; a != CFG->aka.end(); aka++, a++) {
|
||||
|
||||
if(match->equals(a->addr))
|
||||
matchaka = aka;
|
||||
{
|
||||
if (CFG->akamatchfromto)
|
||||
return aka;
|
||||
else
|
||||
matchaka = aka;
|
||||
}
|
||||
|
||||
// Ignore fakenet addresses
|
||||
if(a->addr.net != a->pointnet) {
|
||||
|
Reference in New Issue
Block a user