mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-01-18 02:39:44 +00:00
Probe unicast links created from incoming packets
This commit is contained in:
parent
d65608720b
commit
25ed16178b
@ -153,7 +153,8 @@ static void parse_frame(struct overlay_buffer *buff){
|
||||
context.sender->address.sin_port = htons(interface->port);
|
||||
|
||||
if (context.sender->reachable==REACHABLE_NONE){
|
||||
reachable_unicast(context.sender, interface, *addr, interface->port);
|
||||
set_reachable(context.sender, REACHABLE_UNICAST|REACHABLE_ASSUMED);
|
||||
overlay_send_probe(context.sender, context.sender->address, interface);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -214,9 +214,12 @@ int packetOkOverlay(struct overlay_interface *interface,unsigned char *packet, s
|
||||
RETURN(0);
|
||||
}
|
||||
|
||||
context.sender->last_rx = now;
|
||||
|
||||
// TODO probe unicast links when we detect an address change.
|
||||
|
||||
// always update the IP address we heard them from, even if we don't need to use it right now
|
||||
context.sender->address = f.recvaddr;
|
||||
context.sender->last_rx = now;
|
||||
|
||||
// if this is a dummy announcement for a node that isn't in our routing table
|
||||
if (context.sender->reachable == REACHABLE_NONE &&
|
||||
@ -226,6 +229,7 @@ int packetOkOverlay(struct overlay_interface *interface,unsigned char *packet, s
|
||||
// mark this subscriber as reachable directly via unicast.
|
||||
context.sender->interface = interface;
|
||||
set_reachable(context.sender, REACHABLE_UNICAST|REACHABLE_ASSUMED);
|
||||
overlay_send_probe(context.sender, f.recvaddr, interface);
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user