buglwIP - A Lightweight TCP/IP stack - Bugs: bug #54281, DHCP request send on reboot does...


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

bug #54281: DHCP request send on reboot does not contain hostname option

Submitted by:  Jasper Verschueren <jasperv>
Submitted on:  Tue 10 Jul 2018 02:27:28 PM UTC  
Category:  DHCP Severity:  3 - Normal
Item Group:  Faulty Behaviour Status:  Fixed
Privacy:  Public Assigned to:  Simon Goldschmidt <goldsimon>
Open/Closed:  Closed Planned Release:  None
lwIP version:  git head

Wed 11 Jul 2018 05:58:29 PM UTC, comment #5: 

No, I guess that's enough. If it was some homebrewn router, I would have had a 2nd thought, but if this is as windows server, we'll have to be compatible, I guess...

Pushed, thanks for the patch!

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 11 Jul 2018 11:39:37 AM UTC, comment #4: 

We have a server separate from the gateway that contains both a DNS and a DHCP server. It's a VMhost but I cannot access it and I do not know the specifics of the operating system on the host. It is maintained by an IT firm. We know that it is a windows server but don't know the version, we do think its a 2012 or more recent.
I could ask them, if this isn't enough information. If it isn't, could you give me the exact specs that you need? So I only have to contact them once (they charge for everything...).

Jasper Verschueren <jasperv>
Wed 11 Jul 2018 08:03:49 AM UTC, comment #3: 

Ok, thanks for the update. So which DHCP/DNS server combination are you using?

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Wed 11 Jul 2018 07:53:51 AM UTC, comment #2: 

I looked into following RFCs: 1553 and 2131.
It's not stated when a host name option may be given.
It's just mentioned as a possible option.

So how did I test this issue?
When my implementation boots it does the needed DHCP communication to get an IP address etc and it gives it's host name.
If I ping MYHOSTNAME, I get feedback.

Then I unplug the Ethernet connector and plug it back in again.
When plugged in, netif_set_link_up is called which calls dhcp_network_changed which calls dhcp_reboot. The reboot request message does not contain the host name.

If I then ping MYHOSTNAME again it does not get resolved. If I look at the DNS traffic with Wireshark, I get a no such name.

When adding the patch this does work.

Jasper Verschueren <jasperv>
Tue 10 Jul 2018 07:59:47 PM UTC, comment #1: 

That patch is pretty straightforward, of course. But since this is implementing a standard could you please either cite where this is required or tell us a test setup of how it did not work and your patch makes it work?

I don't know if the original submitter of the hostname integration has forgotten this or left it out on purpose.

Simon Goldschmidt <goldsimon>
Project AdministratorIn charge of this item.
Tue 10 Jul 2018 02:27:28 PM UTC, original submission:  

When the network is changed, dhcp is rebooted.
It will send a dhcp request again to verify it's lease.

DHCP requests are send out in selecting state, rebinding, renewing
and rebooting. But in the rebooting state the hostname option is
not included. This means that after reboot, the hostname will be
unknown to the DNS.
Sending a ping to a host name is then not possible.

I made a patch for it (see attached file).

Jasper Verschueren <jasperv>


Attached Files
file #44535:  0001-DHCP-request-send-on-reboot-does-not-contain-hostnam.patch added by jasperv (1KiB - text/x-patch - patch file with solution)


Depends on the following items: None found

Items that depend on this one: None found


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

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

    Only logged-in users can vote.




    Follow 4 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2018-07-11 goldsimon StatusNone => Fixed
        Assigned toNone => goldsimon
        Open/ClosedOpen => Closed
    2018-07-10 jasperv Attached File- => Added 0001-DHCP-request-send-on-reboot-does-not-contain-hostnam.patch, #44535

    Back to the top

    Powered by Savane 3.5