patchlwIP - A Lightweight TCP/IP stack - Patches: patch #8683, Addresses configured with router...

 
 

You are not allowed to post comments on this tracker with your current authentication level.

patch #8683: Addresses configured with router advertisment are never forgot

Submitter:  Stian Sebastian Skjelstad <mywave>
Submitted:  Thu 11 Jun 2015 02:08:48 PM UTC
   
 
Category:  IPv6 Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  None Open/Closed:  Closed
Planned Release:  None

Jump to the original submission

Fri 19 Aug 2016 06:50:34 AM UTC, comment #8: 

Remaining issues (patch #1 and #2) are about IPv6 address changes not resulting in netif status callbacks. There are further problems in this area, and we have task #13517 for this, so I'll close this one as done.

Simon Goldschmidt <goldsimon>
Group administrator
Thu 03 Sep 2015 06:31:04 PM UTC, comment #7: 


> About NETIF_STATUS_CALLBACK, I'm not 100% sure how the API should work in this case.


Isn't this part of what task #13517 wants to have fixed? For IPv4, the netif status callback is called when the address changes (e.g. AutoIP or DHCP have acquired an address), so I guess IPv6 should call it too when the address change changes.

Another question would be how you would know exactly what has changed, but I guess a "changed" callback is good enough for now.

However, in contrast to the patch, I would make netif_ip6_addr_set_state a function in netif.c. (Reading the code IAR produces for Cortex-M3, I don't think it's larger....)

Simon Goldschmidt <goldsimon>
Group administrator
Thu 03 Sep 2015 08:05:50 AM UTC, comment #6: 

I see now that the code should be okey actually, just that it should have maybe been a define for IP_ADDR_TENTATIVE_COUNT_MASK.. But there was another reason aswell. Trying to remember, since it is a long time ago since I wrote the patch series

Stian Sebastian Skjelstad <mywave>
Thu 03 Sep 2015 07:41:19 AM UTC, comment #5: 

Patch 4:

Looking at the current value of the defines:

#define IP6_ADDR_INVALID      0x00
#define IP6_ADDR_TENTATIVE    0x08
#define IP6_ADDR_TENTATIVE_1  0x09 /* 1 probe sent */
#define IP6_ADDR_TENTATIVE_2  0x0a /* 2 probes sent */
#define IP6_ADDR_TENTATIVE_3  0x0b /* 3 probes sent */
#define IP6_ADDR_TENTATIVE_4  0x0c /* 4 probes sent */
#define IP6_ADDR_TENTATIVE_5  0x0d /* 5 probes sent */
#define IP6_ADDR_TENTATIVE_6  0x0e /* 6 probes sent */
#define IP6_ADDR_TENTATIVE_7  0x0f /* 7 probes sent */

I guess at some point in time, IP6_ADDR_TENTATIVE_1 was defined to 0x01, _2 to 0x02 etc.

The present code does this:
if ((netif->ip6_addr_state[i] & 0x07) >= LWIP_IPV6_DUP_DETECT_ATTEMPTS)

Stian Sebastian Skjelstad <mywave>
Wed 02 Sep 2015 07:16:44 PM UTC, comment #4: 

I pushed patch #3, I think that was relevant. Stian, can you please check it, I couldn't apply patch directly and did it manually.

About NETIF_STATUS_CALLBACK, I'm not 100% sure how the API should work in this case. Additional comments are welcome.

Patch #4, could you please explain a bit more the issue you found.

Ivan Delamer <idelamer>
Group Member
Tue 01 Sep 2015 06:24:04 PM UTC, comment #3: 

Ivan, can I get an input from you on this, is this relevant for 1.5.0?

Simon Goldschmidt <goldsimon>
Group administrator
Wed 19 Aug 2015 09:00:03 AM UTC, comment #2: 

patch set can be remade to not include netif_ip6_addr_set_state() and LWIP_NETIF_STATUS_CALLBACK which makes IPv6 API behave more like IPv4.

These patches are taken directly from my local working branch were I need a working dual IPv4 / IPv6 stack

Stian Sebastian Skjelstad <mywave>
Wed 19 Aug 2015 08:43:53 AM UTC, comment #1: 

The patches below seem to contain far more changes than the summary describes.

Are they all needed to fix the "never forgot" issue? Or would they deserve their own bug entry?

Simon Goldschmidt <goldsimon>
Group administrator
Thu 11 Jun 2015 02:08:48 PM UTC, original submission:  

This patch-series includes a total of four patches

0001 - makes NETIF_STATUS_CALLBACK public. This is needed if callback is to be called from outside netif.c (IPv6 code manipulates netif object more directly, and thus should be allowed to use this)

0002 - netif_ip6_addr_set_state() should cause NETIF_STATUS_CALLBACK to be called, else ALL places that changes the state should call the NETIF_STATUS_CALLBACK directly, which is MANY places

0003 - Forget old addresses that have been configured using prefix/router advertisment. A more clean implementation would be maybe that prefix stores the index or pointer to the address it has created, but that would be an API change

0004 - IP6_ADDR_TENTATIVE logic did not fully work (side effect when reparing the above code). Probably due to bit-rot

Stian Sebastian Skjelstad <mywave>

 

(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by idelamer (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by mywave (Submitted the item)
  •  

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

     

    Follow 6 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2016-08-19 goldsimon StatusNone Done
        Open/ClosedOpen Closed
    2015-06-11 mywave Attached File- Added 0001-Make-NETIF_STATUS_CALLBACK-and-NETIF_LINK_CALLBACK-p.patch, #34201
        Attached File- Added 0003-Forget-about-addresses-when-prefix-router-advertisem.patch, #34202
        Attached File- Added 0002-Make-netif_ip6_addr_set_state-imply-calling-NETIF_ST.patch, #34203
        Attached File- Added 0004-IP6_ADDR_TENTATIVE-logic-does-not-really-work-since-.patch, #34204

    Back to the top

    Powered by Savane 3.13-4448.
    Corresponding source code