[syslinux] [PATCH] Updated udp.c to use real client ip and subnetmask values if on local subnet

jeff_sloan at selinc.com jeff_sloan at selinc.com
Thu Jul 9 09:29:56 PDT 2015


>>>
 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>


More information about the Syslinux mailing list