mirror of
https://github.com/servalproject/serval-dna.git
synced 2025-02-21 17:56:47 +00:00
Test reachable bit flags about ourself
This commit is contained in:
parent
275c99bc4e
commit
4e50b1716c
@ -1752,7 +1752,7 @@ int keyring_send_unlock(struct subscriber *subscriber)
|
||||
{
|
||||
if (!subscriber->identity)
|
||||
return WHY("Cannot unlock an identity we don't have in our keyring");
|
||||
if (subscriber->reachable==REACHABLE_SELF)
|
||||
if (subscriber->reachable & REACHABLE_SELF)
|
||||
return 0;
|
||||
|
||||
struct internal_mdp_header header;
|
||||
|
@ -1014,7 +1014,7 @@ static int search_subscribers(void **record, void *context){
|
||||
struct subscriber *subscriber=*record;
|
||||
struct overlay_mdp_addrlist *response = context;
|
||||
|
||||
if (response->mode == MDP_ADDRLIST_MODE_SELF && subscriber->reachable != REACHABLE_SELF){
|
||||
if (response->mode == MDP_ADDRLIST_MODE_SELF && (subscriber->reachable & REACHABLE_SELF)==0){
|
||||
return 0;
|
||||
}
|
||||
|
||||
@ -1024,7 +1024,7 @@ static int search_subscribers(void **record, void *context){
|
||||
}
|
||||
|
||||
if (response->mode == MDP_ADDRLIST_MODE_ALL_PEERS &&
|
||||
subscriber->reachable == REACHABLE_SELF){
|
||||
(subscriber->reachable & REACHABLE_SELF)){
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -376,7 +376,7 @@ static void update_path_score(struct neighbour *neighbour, struct link *link){
|
||||
static struct link * find_best_link(struct subscriber *subscriber)
|
||||
{
|
||||
IN();
|
||||
if (subscriber->reachable==REACHABLE_SELF)
|
||||
if (subscriber->reachable & REACHABLE_SELF)
|
||||
RETURN(NULL);
|
||||
|
||||
struct link_state *state = get_link_state(subscriber);
|
||||
|
Loading…
x
Reference in New Issue
Block a user