|
From: Joakim E. <jo...@si...> - 2010-09-21 17:08:07
|
Based on what I can see your suggestion to avoid comparing with
link-local addresses should solve the problem. Did you try and get
a positive result?
Best regards,
-- Joakim
Mathieu Pouillot skrev 2010-09-21 17:07:
> /uip_ds6_select_src/ seems to be the problem of the bad selection of
> the source address.
>
> /void
> uip_ds6_select_src(uip_ipaddr_t *src, uip_ipaddr_t *dst)
> {
> uint8_t best = 0; /* number of bit in common with best match */
> uint8_t n = 0;
> uip_ds6_addr_t *matchaddr = NULL;
>
> if(!uip_is_addr_link_local(dst) && !uip_is_addr_mcast(dst)) {
> /* find longest match */
> for(locaddr = uip_ds6_if.addr_list;
> locaddr < uip_ds6_if.addr_list + UIP_DS6_ADDR_NB; locaddr++) {
> if((locaddr->isused) && (locaddr->state ==
> ADDR_PREFERRED)*&&*/*/!uip_is_addr_link_local(//&(locaddr->ipaddr)//)/*/) {
> n = get_match_length(dst, &(locaddr->ipaddr));
> if(n >= best) {
> best = n;
> matchaddr = locaddr;
> }
> }
> }
> } else {
> matchaddr = uip_ds6_get_link_local(ADDR_PREFERRED);
> }
>
> /* use the :: (unspecified address) as source if no match found */
> if(matchaddr == NULL) {
> uip_create_unspecified(src);
> } else {
> uip_ipaddr_copy(src, &matchaddr->ipaddr);
> }
> }/
>
> In my case, the destination is not a link-local and not a multicast
> address, so we enter in the first loop and try to find the src address
> which has the longest match. I have 2 address in addr_list the the
> aaaa::... and fe80::... which have no match with the dest. Then the
> fe80::... is taken as matchaddr:-(
>
> May be it should be necessary to exclude link-local address in the first
> loop to find the longest match. What do you think?
>
> regards,
>
> Mathieu
> Le 21/09/2010 15:50, Mathieu Pouillot a écrit :
>> Hi all,
>>
>> I have a problem with UDP sending when the IPv6 destination is not a
>> link-local address or not from my prefix.
>>
>> A-----B-----BR---C
>>
>> A has fe80::10 as link-local and aaaa::10 as global
>> B has fe80::11 as link-local and aaaa::11 as global
>> BR has fe80::12 as link-local and aaaa::12 as global
>> C has fe80::50 as link-local and 2a01::50 as global
>>
>> When I send a UDP frame from A to BR [aaaa::12] the IP src of the frame
>> is the global Address of A, so the sending is ok.
>> When I send a UDP frame from A to C [2a01::50] the IP src of the frame
>> is the link-local Address of A, and so the next hop B droppes the frame.
>>
>> Have you the same problem? Do you have a solution?
>>
>> best regards,
>>
>> Mathieu
>>
>
>
> --
> Mathieu Pouillot
> R&D Engineer
> m.p...@wa...
>
> Tel : +33(0)4 98 01 60 05 (Poste 43)
> Fax : +33(0)4 94 14 10 80
> 1766 Chemin de la Planquette
> 83130 LA GARDE - France
> www.watteco.com<http://www.watteco.com/>
>
>
>
> ------------------------------------------------------------------------------
> Start uncovering the many advantages of virtual appliances
> and start using them to simplify application deployment and
> accelerate your shift to cloud computing.
> http://p.sf.net/sfu/novell-sfdev2dev
>
>
>
> _______________________________________________
> Contiki-developers mailing list
> Con...@li...
> https://lists.sourceforge.net/lists/listinfo/contiki-developers
|