X-Git-Url: https://git.distorted.org.uk/~mdw/secnet/blobdiff_plain/67871f70403951d279efb20e4821b77dd75daecf..b2de6bd2d9b5e9047a660e926c4adb17da54fc29:/site.c diff --git a/site.c b/site.c index 90ad2c5..db14523 100644 --- a/site.c +++ b/site.c @@ -1756,6 +1756,11 @@ static bool_t named_for_us(struct site *st, const struct buffer_if *buf_in, } static bool_t we_have_priority(struct site *st, const struct msg *m) { + if ((st->local_capabilities & m->remote_capabilities) + && CAPAB_PRIORITY_MOBILE) { + if (st->local_mobile) return True; + if (st-> peer_mobile) return False; + } return st->our_name_later; } @@ -2165,6 +2170,9 @@ static list_t *site_apply(closure_t *self, struct cloc loc, dict_t *context, st->local_capabilities |= capbit; } + if (st->local_mobile || st->peer_mobile) + st->local_capabilities |= CAPAB_PRIORITY_MOBILE; + /* We need to register the remote networks with the netlink device */ uint32_t netlink_mtu; /* local virtual interface mtu */ st->netlink->reg(st->netlink->st, site_outgoing, st, &netlink_mtu);