Legacy Networking | DHCP request includes host name option even if hostname is zero length (#20)
Trac Migrate (@tracmigrate)
gitlab at rtems.org
Fri Jan 31 18:25:34 UTC 2025
Trac Migrate created an issue: https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/issues/20
Assignee: Trac Migrate
Original author: Sal
DHCP requests add the hostname option in _dhcp_request_req()_ without checking its length, so the hostname can be of any length. This is a defect because the DHCP spec (https://tools.ietf.org/html/rfc2132) requires the hostname to have a minimum length of 1 char.
This appears to trigger a bug in a specific Netgear router that causes it's DHCP process to lock up and could affect other things as well.
This bug can be solved applying the patch made by Aun-Ali Zaidi in the original ticket reporting this defect (https://devel.rtems.org/ticket/1405) that was never applied. I've also attached the patch in this ticket.
I've been able to compile the code with the patch applied and it didn't raise any warnings.
Original ticket: https://devel.rtems.org/ticket/1405
* [0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2.2.patch](/assets/tracmigration/ticket_attachments/0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2.2.patch)
* [0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2-1.patch](/assets/tracmigration/ticket_attachments/0001-libnetworking-rtems_dhcp.c-Fix-improper-hostname-han.2-1.patch)
--
View it on GitLab: https://gitlab.rtems.org/rtems/pkg/rtems-net-legacy/-/issues/20
You're receiving this email because of your account on gitlab.rtems.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20250131/36914881/attachment.htm>
More information about the bugs
mailing list