X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?p=secnet.git;a=blobdiff_plain;f=site.c;h=db1452394bf67b7f173cb8133dd2793c573f24eb;hp=90ad2c5678470a7fd6f022aa73ea624d1c93c36f;hb=b2de6bd2d9b5e9047a660e926c4adb17da54fc29;hpb=67871f70403951d279efb20e4821b77dd75daecf 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);