[support] Dynamic MNP's for MR?
Arnaud Ebalard
arno at natisbad.org
Mon Sep 28 20:11:39 JST 2009
Hi,
Mattias Blomqvist <mattias.blomqvist at gmail.com> writes:
> On Mon, Sep 28, 2009 at 12:54 PM, Arnaud Ebalard <arno at natisbad.org> wrote:
>> Hi Mattias,
>>
>> Sorry for the long delay. I was busy.
>>
>> Mattias Blomqvist <mattias.blomqvist at gmail.com> writes:
>>>
>>> I took this route and it was quite easy to get it to work for adding
>>> MNPs to existing HoA's. This works and the new MNP is reachable from a
>>> CN.
>>> What I do is basically adding (or deleting) the MNP to the MNP list
>>> for an existing HoA record and then trigger a movement by a call to
>>> mn_movement_event(). This results in a new BU which the HA accepts.
>>> So far so good.
>>> What I've discovered is that although the network of the newly added
>>> MNP is reachable from a CN and the other way around, the network of
>>> the newly added MNP is not reachable (pingable) from the MR itself.
>>> This seems to be due to missing routes in at least the RT6_TABLE_MIP6
>>> (252), maybe also in the main table. I've tried adding a call to
>>> nemo_mr_tnl_routes_add() after adding the new MNP but before
>>> triggering the BU. This does not seem to help.
>>>
>>> What I'm looking for is some pointers in how to get the routes in
>>> place using the already available infrastructure.
>>
>> In mn_init(), the following:
>>
>> list_for_each(l, &conf.home_addrs) {
>> struct home_addr_info *hai;
>> hai = list_entry(l, struct home_addr_info, list);
>> if (conf_home_addr_info(hai) < 0)
>> goto err_hoa;
>> }
>>
>> installs the rules on the MR, via calls to nemo_mr_rules_add. You could
>> probably create a small helper (nemo_mr_rule_add()/nemo_mr_rule_del()
>> to handle addition/removal of one rule) and then calling it when
>> adding/removing a MNP dynamically
>
> I saw that construct. However, I thought a call to conf_home_addr_info
> with an existing hai would cause trouble. But maybe that wasn't what
> you meant.
No, I meant creating small helpers wrapping (example for addition):
if (rule_add(NULL, RT6_TABLE_MAIN,
IP6_RULE_PRIO_MIP6_MNP_IN, RTN_UNICAST,
&in6addr_any, 0,
&p->ple_prefix, p->ple_plen, 0) < 0) {
and
if (rule_add(NULL, RT6_TABLE_MIP6,
IP6_RULE_PRIO_MIP6_FWD, RTN_UNICAST,
&p->ple_prefix, p->ple_plen,
&in6addr_any, 0, 0) < 0) {
but ...
> Anyway, I solved the problem. The trick was to add (or delete) two
> rules and and one route when adding (or deleting) a new MNP for an
> existing HoA.
... this is basically what you did.
Cheers,
a+
More information about the Support
mailing list