From: Chip Salzenberg <[EMAIL PROTECTED]>
Subject: Re: DHCP option 150 = config file (untested)
Date: Tue, 6 Jun 2000 20:16:19 -0700
> According to Christoph Plattner:
> > I'm not sure, if Mr. Salzenberg's implementation is correct.
> > I don't know, if the BOOTP record uses '\0' termnated strings.
>
> It doesn't.
Yes, it shouldn't, so I terminated the string explicitily, like
Chip's patch. But now I reread RFC2132 and it says:
.... The value of the length octet does not include the two
octets specifying the tag and length. The length octet is followed
by "length" octets of data. Options containing NVT ASCII data SHOULD
NOT include a trailing NULL; however, the receiver of such options
MUST be prepared to delete trailing nulls if they exist. The
receiver MUST NOT require that a trailing null be included in the
data. In the case of some variable-length options the length field
is a constant but must still be specified.
Therefore, both my implementation and Etherboot's one are not very
correct. We should check what amount of trailing NULs are appending,
before copying, if we want to make the code enough robust. So I'll fix
the "trailing NULs" problem in both GRUB and Etherboot.
Okuji