jeff_sloan at selinc.com
2015-Jul-09 16:29 UTC
[syslinux] [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
>>>I'm also interested on this, but I do not quite understand the problem. Could you please tell us more about this issue (Wireshark) <<< Attached is a Wireshark capture using the current commit (43f5efa) from Patrick's repo, .Syslinux.efi is downloaded, there is an ARP and then nothing hits the wire from the client. The internal failing scenario is core_udp_sendto in syslinux calls Udp4Configure BIOS command, (I will grab the packet.) BIOS returns an EFI_UNSUPPORTED (EFIERR (3)) error but tftp_open still tries to transmit a packet and waits for a reply (core_udp_recv). The loop timeout values are long enough that the watchdog eventually times out and reboots the client. In tftp.c (tftp_open) starting at line 240: sendreq: timeout = *timeout_ptr++; if (!timeout) return; /* No file available... */ oldtime = jiffies(); core_udp_sendto(socket, rrq_packet_buf, rrq_len, url->ip, url->port); /* If the WRITE call fails, we let the timeout take care of it... */ wait_pkt: for (;;) { buf_len = sizeof(reply_packet_buf); err = core_udp_recv(socket, reply_packet_buf, &buf_len, &src_ip, &src_port); if (err) { jiffies_t now = jiffies(); if (now - oldtime >= timeout) goto sendreq; } else { /* Make sure the packet actually came from the server and is long enough for a TFTP opcode */ dprintf("tftp_open: got packet buflen=%d\n", buf_len); if ((src_ip == url->ip) && (buf_len >= 2)) break; } I owe you the exact contents of the failing packets/buffers but I am headed out the door to see if a doctor can keep me alive... (I think I have bubonic plague.) As soon as I return I will get the info to you but I wanted to let you know that I am working on it. I will also set up and test a multi-NIC network as well as remote proxy/TFTP. Current setup: The DHCP server is remote but the proxy and TFTP servers are local. Let me know if there is anything else you need or have any questions. Thanks! Jeff Sloan -------------- next part -------------- A non-text attachment was scrubbed... Name: UseDefaultAddressTrue.pcapng Type: application/octet-stream Size: 227088 bytes Desc: not available URL: <http://www.zytor.com/pipermail/syslinux/attachments/20150709/c6892de4/attachment-0001.obj>
Patrick Masotta
2015-Jul-10 12:51 UTC
[syslinux] [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
>>> I owe you the exact contents of the failing packets/buffers<<< I have seen the capture but I couldn't find anything wrong there; When you get a minute please assemble the rest of info; so far it's not clear what the symptoms really are.>>>but I am headed out the door to see if a doctor can keep me alive... (I think I have bubonic plague.) As soon as I return I will get the info to you but I wanted to let you know that I am working on it. I will also set up and test a multi-NIC network as well as remote proxy/TFTP. Thanks! Jeff Sloan <<< I hope our health is OK Best, Patrick
jeff_sloan at selinc.com
2015-Jul-14 20:26 UTC
[syslinux] [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
>>>I have seen the capture but I couldn't find anything wrong there; When you get a minute please assemble the rest of info; so far it's not clear what the symptoms really are. <<< The IP4 config data struct contents from core_udp_open is included below. When UseDefaultAddress is TRUE, it passes 0.0.0.0 for StationAddress and NetMask. core_udp_open calls core_udp_configure which calls efiip4configure (BIOS). BIOS validates SA and NM but special-cases both null to allow for proxy. BIOS tries to find the GUID to configure but fails and returns EFI_UNSUPPORTED error, EFIERR(3). Then core_udp_sendto attempts to send the packet even though it was never configured. It does not check for problems, instead relying on the core_udp_recv to timeout. It retries based on the timeout table but before completing all of the retries, the watchdog timer triggers a reset. So the net is that no udp packets hit the wire once syslinux starts executing. I was able to circumvent this by setting UseDefaultAddress to FALSE and populating SA and NM to correct values. Is there a better/more global approach if the SA/NM values are NULL? The other question I have is how should we handle a fail from the configure? Thoughts?>>>>>> but I am headed out the door to see if a doctor can keep me alive... (I think I have bubonic plague.) <<< I hope our health is OK <<< Thanks! A bad bout of bronchitis but with a full pharmacy of meds, I'm doing much better. Better living through chemistry. ip4 config data contents: This is a mem copy from an Arium so the first column is the address, second and third are 64 bit contents and the fourth is ASCII. The RemoteAddress is 10.39.31.250 (FA1F270A on the second row). Both SA and NM are 0. 00000000C78CEF50L 0000400000000100 0000000000000000 ..... at .......... 00000000C78CEF60L 0000000000000001 FA1F270A06290000 ..........)..'.z 00000000C78CEF70L 0000000000000045 00000000C78CF003 E........p.G.... ip4 handle that results in EFI_UNSUPPORTED: 00000000C99E2318L 000000006C646E68 00000000C8E1DBA0 hndl.... [aH.... 00000000C99E2328L 00000000C9BC07A0 00000000C8E0C828 .<I....(H`H.... 00000000C99E2338L 00000000C99DDF28 000000000000780A (_.I.....x...... 00000000C99E2348L 0000000000000401 000000586C617470 ........ptalX... 00000000C99E2358L 7E840FE73B45017E 0002D68E0F000002 ~.E;g..~.....V.. 00000000C99E2368L 44227E03FC834100 850FE53B45046E8D .A.|.~"D.n.E;e.. 00000000C99E2378L 0FED8548000002C3 0000005030646870 C...H.m.phd0P... 00000000C99E2388L AFAFAFAF00000004 AFAFAFAFAFAFAFAF ....//////////// Any questions or additional details needed, just ask. Jeff Sloan
Reasonably Related Threads
- [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
- [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
- [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
- [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet
- [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet