[Bug 208669] Improvement of pxeboot using Linux NFS servers.

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Sun Apr 10 12:01:00 UTC 2016


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=208669

            Bug ID: 208669
           Summary: Improvement of pxeboot using Linux NFS servers.
           Product: Base System
           Version: 10.2-STABLE
          Hardware: i386
                OS: Any
            Status: New
          Severity: Affects Only Me
          Priority: ---
         Component: arm
          Assignee: freebsd-arm at FreeBSD.org
          Reporter: zen-freebsd-users at suzuki.que.ne.jp
                CC: freebsd-i386 at FreeBSD.org
                CC: freebsd-i386 at FreeBSD.org

I tried to boot by pxeboot using some Linux nfs servers.

But, I could not  boot by using Linux nfs servers. 

I tested using CentOS6.7 and CentOS7.1 as a dhcp,tftp,NFS server.
The pxeboot of FreeBSD9.3 and 10.2 correctly downloaded by TFTP from Linux
server.

At second stage , the pxeboot will mount to load kernel by nfs. But, pxeboot
was failed to mount nfs.

I monitored a packet using tcpdump. It was as below.

14:12:47.658036 IP 192.168.8.215.1023 > 192.168.8.2.sunrpc: UDP,length 76
14:12:47.658349 IP 192.168.8.2.sunrpc > 192.168.8.215.1023: UDP,length 28
... reapeat infinity ....

I checked  a source file of pxeboot at FreeBSD 9.3, then I was succeed to boot
using Linux NFS Server.

My improvement is as below.

*** /sys/boot/i386/libi386/pxe.c.orig  2014-12-14 13:47:38.000000000 +0900
--- /sys/boot/i386/libi386/pxe.c       2016-04-10 20:24:13.000000000 +0900
***************
*** 673,679 ****
        uh = (struct udphdr *) pkt - 1;
        bzero(udpread_p, sizeof(*udpread_p));

!       udpread_p->dest_ip        = h->myip.s_addr;
        udpread_p->d_port         = h->myport;
        udpread_p->buffer_size    = len;
        udpread_p->buffer.segment = VTOPSEG(data_buffer);
--- 673,679 ----
        uh = (struct udphdr *) pkt - 1;
        bzero(udpread_p, sizeof(*udpread_p));

!       udpread_p->src_ip         = h->destip.s_addr;
        udpread_p->d_port         = h->myport;
        udpread_p->buffer_size    = len;
        udpread_p->buffer.segment = VTOPSEG(data_buffer);

The Intel's document of pxe says 

DestIP: Only accept packets sent to this IP address. If this is zero,
packets sent to any IP address are accepted

http://www.intel.com/design/archives/wfm/downloads/pxespec.htm

I remove line of udpread_p->dest_ip... , And added the line
udpread_p->src_ip... for security.

I wonder why NFS Server of FreeBSD is success at the code of current.
Unfortunately a reason isn't understood.


--- my test enviroment
Boot server
 CentOS6.7 and CentOS7.1.

Diskless client
 FreeBSD-9.3
 Hardware1: virtual machin of VMware ESXi 6.0
 Hardware2: M/B SuperMicro X8SIL-F (IntelPXE)

-- 
You are receiving this mail because:
You are on the CC list for the bug.


More information about the freebsd-i386 mailing list