buglwIP - A Lightweight TCP/IP stack - Bugs: bug #30039, AutoIP does not reuse previous...

 
 

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

bug #30039: AutoIP does not reuse previous addresses

Submitted by:  Bill Auerbach <billauerbach>
Submitted on:  Wed 02 Jun 2010 06:20:23 PM UTC  
 
Category: NoneSeverity: 3 - Normal
Item Group: Faulty BehaviourStatus: Fixed
Privacy: PublicAssigned to: Simon Goldschmidt <goldsimon>
Open/Closed: ClosedPlanned Release: None
lwIP version: CVS Head

(Jump to the original submission Jump to the original submission)

Mon 14 Jun 2010 08:47:05 PM UTC, comment #6:

Good point Simon. Then the change is OK.

One more point: I think dhcp_start should not call autoip_stop. Here's why. Suppose that the application sees that the netif is up and then sees that the AutoIP flag is set. It could choose to call dhcp_stop to prevent dhcp overhead and traffic. dhcp_stop should stop the dhcp processing on the netif but should leave anything AutoIP did alone. Do you agree?

Bill Auerbach <billauerbach>
Mon 14 Jun 2010 08:38:49 PM UTC, comment #5:

Shouldn't the parameter 'netif' to LWIP_AUTOIP_CREATE_SEED_ADDR() make it pretty improbable that 2 netifs decide to try the same address? And if so, what would be the problem? If you were to send from an application program to an AutoIP address with more than one AutoIP netif, no matter if the 2 netifs have the same address or not, the order of the list would decide about the target network.

After all, AutoIP addresses should be link-local. As long as your 2 netifs aren't connected to the same link, they may even have the same address.

> Whoops - autoip_start in previous post where I used dhcp_start...

Yes, it didn't make much sense without that change :-)

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Mon 14 Jun 2010 08:33:09 PM UTC, comment #4:

Whoops - autoip_start in previous post where I used dhcp_start...

Bill Auerbach <billauerbach>
Mon 14 Jun 2010 08:31:35 PM UTC, comment #3:

Funny I was just reading this entry. For 2 netif's, each would call dhcp_start and both might start AutoIP with the same address so for this reason I understand why the increment occurred in dhcp_start. So it's like we need it but we don't need it.

I would expect that if each netif starts with the same AutoIP address that they would duke it out and one would change, but I have no way to test this. I will never have an lwIP device with more than one netif.

Bill Auerbach <billauerbach>
Mon 14 Jun 2010 08:27:14 PM UTC, comment #2:

I think that's correct. I've added a static function autoip_restart that increments the counter before calling autoip_start.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Thu 03 Jun 2010 01:54:32 PM UTC, comment #1:

The increment of the IP address can be inserted just before the 3 calls to autoip_start in autoip.c. In all of these cases the call is to resolve a conflict and the address to try must be changed. Then the calls to autoip_start from dhcp won't be changing the IP address.

Bill Auerbach <billauerbach>
Wed 02 Jun 2010 06:20:23 PM UTC, original submission:

If the line:

autoip->tried_llipaddr++;

is not removed from autoip_start, every call to dhcp_network_changed that calls dhcp_start or any direct calls to dhcp_start will cause a sequential increase in the assigned AutoIP address. I believe this is not desirable - in fact the RFC indicates it SHOULD reuse the previous address if possible.

I understand the reason for the increment with multiple netifs. I also think if it's not done, that the ARP checking that is done will fail because the other netif will have the same IP address as the next netif forcing a reassignment.

In any case, I think this needs to be implemented differently.

Bill Auerbach <billauerbach>

 

No files currently attached

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -unavailable- added by goldsimon (Posted a comment)
  • -unavailable- added by billauerbach (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 3 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Mon 14 Jun 2010 08:27:14 PM UTCgoldsimonStatusNone=>Fixed
      Assigned toNone=>goldsimon
      Open/ClosedOpen=>Closed

    Back to the top


    Powered by Savane 3.1-cleanup1