patchlwIP - A Lightweight TCP/IP stack - Patches: patch #6725, Teach AutoIP and DHCP to respond...

 
 

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

patch #6725: Teach AutoIP and DHCP to respond to netif_set_link_up()

Submitter:  Jakob Stoklund Olesen <stoklund>
Submitted:  Mon 19 Jan 2009 12:44:40 PM UTC
   
 
Category:  None Priority:  5 - Normal
Status:  Done Privacy:  Public
Assigned to:  stoklund Open/Closed:  Closed
Planned Release:  1.4.0

Jump to the original submission

Tue 25 Aug 2009 04:11:33 PM UTC, comment #8: 

My commit mails are blocked. I think it is probably because I read that list via Gmane, and so am not subscribed?

I will update the change log with this patch, and add patch info in the future.

Jakob Stoklund Olesen <stoklund>
Group Member
Tue 25 Aug 2009 03:37:08 PM UTC, comment #7: 

Isn't this done now (with the commit from august 24th)?

I did not receive a mail on lwip-commit for that one, does anybody have a clue why?

Jakob: it's always a good idea to adde the patch number to a commit summary to let others know what has been done. And please update the CHANGELOG file, too!

Simon Goldschmidt <goldsimon>
Group administrator
Tue 18 Aug 2009 02:45:59 PM UTC, comment #6: 

No objections.

Kieran Mansley <kieranm>
Group Member
Tue 18 Aug 2009 02:01:53 PM UTC, comment #5: 

Any objections to my committing these for 1.4.0?

Jakob Stoklund Olesen <stoklund>
Group Member
Sun 03 May 2009 11:47:29 AM UTC, comment #4: 

For what it's worth, I am shipping devices with these patches.
I agree that independent verification would be nice.

Jakob Stoklund Olesen <stoklund>
Group Member
Sat 02 May 2009 08:51:41 PM UTC, comment #3: 

I think this is an important feature for a customer-friendly device. However, although I guess I'll need this in the future, I can't test it at the moment.

So unless there is someone to verify these patches, I'd target them to 1.4.0 (they're not THAT hard to test, but too much for 1.3.1, I think).

Simon Goldschmidt <goldsimon>
Group administrator
Tue 20 Jan 2009 04:59:36 PM UTC, comment #2: 

Luca, thanks for pointing out my mistake in the comments.

I forgot to mention: This patch depends on Patch #6721 for proper DHCP/AutoIP cooperation. This is even more important when restarting DHCP on link-up events.


Jakob Stoklund Olesen <stoklund>
Group Member
Tue 20 Jan 2009 09:56:22 AM UTC, comment #1: 

The AUTOIP part seems OK, except this comment:

> + * Sends an ARP probe from a network interface
> + *
> + * @param netif network interface used to send the announce

                                                      ^^^^^^^^
"probe".

> + */
> +static err_t
> +autoip_arp_probe(struct netif *netif)



Luca

Luca Ceresoli <lucaceresoli>
Mon 19 Jan 2009 12:44:40 PM UTC, original submission:  

From RFC 3927 ยง2.2 (AutoIP):

"When a network interface transitions from an inactive to an active state, the host does not have knowledge of what IPv4 Link-Local addresses may currently be in use on that link, since the point of attachment may have changed or the network interface may have been inactive when a conflicting address was claimed."

Patch autoip-network-changed changes netif_set_link_up to do the following with an AutoIP address:

netif_set_down()
autoip_start_probing()

Later autoip_bind() will bring the interface up again.

Patch dhcp-network-changed does the same for DHCP. netif_set_link_up() causes:

netif_set_down()
dhcp_reboot() or dhcp_discover() as appropriate.

As for AutoIP, dhcp_bind() will bring the interface up again.

dhcp_reboot() and proper handling of the REBOOTING state has been implemented.

These patches have been tested in the following scenarios:

1. Disconnect/reconnect to an AutoIP network without DHCP server.
2. Disconnect/reconnect to a DHCP network.
3. Move from AutoIP network to DHCP network.
4. Move from DHCP network to AutoIP network.
5. Move from one DHCP network to another.

The patches behave correctly in all cases, reestablishing the IP addresses as quickly as possible.

The dhcp_reboot() procedure has been tested with a DHCP server that sends NAK for a wrong address, and with a server that simply ignores the request.



Jakob Stoklund Olesen <stoklund>
Group Member

 

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

Attached Files
file #17297:  autoip-network-changed added by stoklund (7KiB - application/octet-stream - Fix cut-and-paste error in comment for autoip_arp_probe)
file #17289:  autoip-network-changed added by stoklund (7KiB - application/octet-stream)
file #17290:  dhcp-network-changed added by stoklund (6KiB - application/octet-stream)

 

Depends on the following items: None found

Items that depend on this one: None found

 

Carbon-Copy List
  • -email is unavailable- added by kieranm (Posted a comment)
  • -email is unavailable- added by goldsimon (Posted a comment)
  • -email is unavailable- added by lucaceresoli (Posted a comment)
  • -email is unavailable- added by stoklund (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 8 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2009-08-25 stoklund StatusIn Progress Done
        Open/ClosedOpen Closed
    2009-08-25 goldsimon StatusNone In Progress
        Assigned toNone stoklund
    2009-05-02 goldsimon Planned ReleaseNone 1.4.0
    2009-01-20 stoklund Attached File- Added autoip-network-changed, #17297
    2009-01-19 stoklund Attached File- Added autoip-network-changed, #17289
        Attached File- Added dhcp-network-changed, #17290

    Back to the top

    Powered by Savane 3.13-f8d8.
    Corresponding source code