On Thu, Jan 25 2018, Christian Weisgerber <[email protected]> wrote:
> tftpd needs to handle the transfer size option when faking up
> /etc/random.seed.
>
> Without this, clients that query the size receive 0 as response,
> preventing efiboot from loading random.seed.
>
> ok?

Looks correct, ok jca@

> Index: tftpd.c
> ===================================================================
> RCS file: /cvs/src/usr.sbin/tftpd/tftpd.c,v
> retrieving revision 1.40
> diff -u -p -r1.40 tftpd.c
> --- tftpd.c   7 Nov 2017 14:15:38 -0000       1.40
> +++ tftpd.c   25 Jan 2018 12:49:39 -0000
> @@ -973,6 +973,8 @@ validate_access(struct tftp_client *clie
>  
>               buf = client->buf + sizeof(client->buf) - 512;
>               arc4random_buf(buf, 512);
> +             if (options != NULL && options[OPT_TSIZE].o_request)
> +                     options[OPT_TSIZE].o_reply = 512;
>               client->file = fmemopen(buf, 512, "r");
>               if (client->file == NULL)
>                       return (errno + 100);

-- 
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF  DDCC 0DFA 74AE 1524 E7EE

Reply via email to