lwip-devel
[Top][All Lists]
Advanced

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

[lwip-devel] [bug #60156] xid reused for DHCP release


From: Christoffer Lind
Subject: [lwip-devel] [bug #60156] xid reused for DHCP release
Date: Tue, 2 Mar 2021 10:05:36 -0500 (EST)
User-agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/84.0.4147.135 Safari/537.36

URL:
  <https://savannah.nongnu.org/bugs/?60156>

                 Summary: xid reused for DHCP release
                 Project: lwIP - A Lightweight TCP/IP stack
            Submitted by: clind
            Submitted on: Tue 02 Mar 2021 03:05:34 PM UTC
                Category: DHCP
                Severity: 3 - Normal
              Item Group: None
                  Status: None
                 Privacy: Public
             Assigned to: None
             Open/Closed: Open
         Discussion Lock: Any
         Planned Release: None
            lwIP version: git head

    _______________________________________________________

Details:

When a DHCP release is sent the dhcp->tries count is != 0 which results in the
same xid as last sent message to be used. The dhcp->tries counter is normally
cleared before dhcp_create_msg() is called as the state is changed by
dhcp_set_state(), except when transitioning to the release state.

This was introduced when fixing bug #50242 as dhcp_set_state() was moved to
after dhcp_create_msg().

This can be solved by either:
* Move dhcp_set_state() to before dhcp_create_msg() but after 
if (dhcp_supplied_address(netif))
* Clear dhcp->tries before calling dhcp_create_msg()

Option 1 is probably the preferred solution (see attached patch).



    _______________________________________________________

File Attachments:


-------------------------------------------------------
Date: Tue 02 Mar 2021 03:05:34 PM UTC  Name:
0001-dhcp-generate-new-xid-for-DHCP-release.patch  Size: 1KiB   By: clind

<http://savannah.nongnu.org/bugs/download.php?file_id=50973>

    _______________________________________________________

Reply to this item at:

  <https://savannah.nongnu.org/bugs/?60156>

_______________________________________________
  Message sent via Savannah
  https://savannah.nongnu.org/




reply via email to

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