bootcode incompliant with DHCP RFC2131 - DISCOVER & OFFER but no REQUEST or ACK
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Bug
- Clarity
- Mostly clear
- Activity status
- Stale
- Domain
- embedded-iot, networking
Research direction
Start with bootcode.bin, the attached packet capture, and RFC 2131 sections 3.1.3 and 3.1.4; compare the observed DHCPDISCOVER/DHCPOFFER exchange with the required sequence. Done means the netboot flow sends DHCPREQUEST, waits for DHCPACK or DHCPNAK, and only then contacts the TFTP server.
Written by the indexing model from the issue text.
Description
Describe the bug
Netbootcode in bootcode.bin is not behaving in an RFC 2131-compliant manner when booting BOOTP/PXE.
- A DHCPDISCOVER is sent by RPi.
- A DHCPOFFERs are collected. Once the one carrying SIADDR and/or(?) Option 66 containing TFTP reference has been observed RPi netbootcode stops following any semblance of prescribed procedure, configures the offered IP address and goes for the TFTP server.
To reproduce
- Place latest bootcode.bin on the SD card.
- Configure DHCP with TFTP options.
- Launch tcpdump/wireshark on DHCP server or anywhere on the network (DISCOVER, OFFER and REQUEST are all broadcasts) and observe captured traffic.
- Run the RPi on.
Expected behaviour
RFC2131 Section 3.1.3 and 3.1.4 clearly mandate what should happen next:
- RPI netbootcode should consume a DHCPOFFER and send a DHCPREQUEST to the server that produced it to actually request that IP from the server.
- The server in turn will reply with DHCPACK confirming IP selection or DHCPNAK if the previously offered IP has been allocated.
- Then and only then, should netbootcode actually go for TFTP server having received confirmation it can use the offered IP.
Actual behaviour
Without confirming with the DHCP that offered it the requested configuration, RPi netbootcode uses the IP offered. Problem is, in a busy environment this may result in conflicts, offer thrashing and mess on the network where offered IPs are reused and doubly allocated.
System
- Which model of Raspberry Pi?
Pi3B+, Pi2Bv1.1 - Which OS and version (
cat /etc/rpi-issue)?
bootcode.bin https://github.com/raspberrypi/firmware/blob/a6496ae5cd5e9b4cd5b38f7274fa94dce315fa7a/boot/bootcode.bin - Which firmware version (
vcgencmd version)?
N/A - Which kernel version (
uname -a)?
N/A
Logs
Attached.
Additional context
None.
- Dominant language
- No language data
- Stars
- 5.6k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from raspberrypi/firmware
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/firmware#2042 ·
-
Difficulty 4/5 3-5 days Newbie friendliness 48/100
raspberrypi/firmware#2040 · 2 comments ·
-
Difficulty 5/5 Over a week Newbie friendliness 25/100
raspberrypi/firmware#2039 · 6 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 42/100
raspberrypi/firmware#2038 · 4 comments ·
-
Difficulty 4/5 3-5 days Newbie friendliness 38/100
raspberrypi/firmware#2037 · 4 comments ·
All issues in raspberrypi/firmware
Similar issues
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
[adam] AdamNet network read doesn't cap to MAX_ADAM_PACKET_LEN, overflows client receive buffers Open
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
FujiNetWIFI/fujinet-firmware#1649 · 2 comments ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
espressif/esp-iot-solution#786 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100