lwip-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[lwip-devel] [patch #6725] Teach AutoIP and DHCP to respond to netif_set


From: Jakob Stoklund Olesen
Subject: [lwip-devel] [patch #6725] Teach AutoIP and DHCP to respond to netif_set_link_up()
Date: Mon, 19 Jan 2009 12:44:42 +0000
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.0.5) Gecko/2008121622 Ubuntu/8.10 (intrepid) Firefox/3.0.5

URL:
  <http://savannah.nongnu.org/patch/?6725>

                 Summary: Teach AutoIP and DHCP to respond to
netif_set_link_up()
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: stoklund
            Submitted on: Mon 19 Jan 2009 01:44:40 PM CET
                Category: None
                Priority: 5 - Normal
                  Status: None
                 Privacy: Public
             Assigned to: None
        Originator Email: 
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None

    _______________________________________________________

Details:

>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.






    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Mon 19 Jan 2009 01:44:40 PM CET  Name: autoip-network-changed  Size:
7kB   By: stoklund

<http://savannah.nongnu.org/patch/download.php?file_id=17289>
-------------------------------------------------------
Date: Mon 19 Jan 2009 01:44:40 PM CET  Name: dhcp-network-changed  Size: 6kB 
 By: stoklund

<http://savannah.nongnu.org/patch/download.php?file_id=17290>

    _______________________________________________________

Reply to this item at:

  <http://savannah.nongnu.org/patch/?6725>

_______________________________________________
  Message sent via/by Savannah
  http://savannah.nongnu.org/





reply via email to

[Prev in Thread] Current Thread [Next in Thread]