[support] Problems when trying to manipulate the mip6d-nemo-mcoa code

Arnaud Ebalard arno at natisbad.org
Fri Sep 18 19:55:30 JST 2009


Hi,

Angel Bartomeu Bonillo <angelbartomeu at gmail.com> writes:

> I installed a piece of code in the movement.c file (some kind of back door)
> so I can manipulate some of the behaviour of the Mobile Router from another
> software I wrote.
> Since I do not know exactly the details of this implementation, I am trying
> not to touch the data structures by just trying to fake some events that
> lead to what I need the code to do for me.
> So far, my code is able to fake the arrival of a Router Advertisement (by
> calling the md_recv_ra funtion) so the mip6d register a binding with the HA
> and one tunnel is created.
> However, I am stuck trying to make the code to expire the binding (which
> should lead to the tunnel removal) when I wish.
>
> Basically, what I do now is to call the function "md_expire_coa(iface, coa)"
> and then calling "__md_trigger_movement_event(ME_COA_EXPIRED, 0, iface,
> coa)"
> but thought apparently the CoA is removed from the iface, the binding is
> still active in both the Mobile Router and the HA. I also tried to use the
> funtion md_free_router(rtr) but, since the default route is removed, no
> communication with the HA is possible.
>
> What am I missing? what else should I do to make the Mobile Router code send
> the Binding de-registration and deleting the tunnel corresponding to the CoA
> I want to stop using?

I think using "__md_trigger_movement_event(ME_COA_EXPIRED, 0, iface,
coa)" should work. Take a look at process_del_addr() to see what else is
needed.

That been said, if you externally remove the address from the iface
(like with "ip addr del 2001:db8::1 dev eth0"), umip will detect the
change and switch to another address (if one is available). Is there any
particular reason to do that from inside umip.

For the fake arrival of a RA, can't you use the tunnel patch I have and
do things outside UMIP: it allows using interfaces which are externally
configured (like teredo ifaces, ppp ifaces, 6to4 ifaces, ...), i.e. for
which UMIP does not need to send RS and process RA :

http://hg.natisbad.org/migrate2_patches_umip_nemo/file/0d825828357e/tunnel_support.patch

It works with NEMO (for sure) but has never been tested with mcoa, though.

Cheers,

a+


More information about the Support mailing list