From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ramon Fried Date: Fri, 22 May 2020 22:19:31 +0300 Subject: [PATCH v4] net: tftp: Add client support for RFC 7440 In-Reply-To: <1590107365262-0.post@n7.nabble.com> References: <20200519192557.18075-1-rfried.dev@gmail.com> <1590107365262-0.post@n7.nabble.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Thanks. On Fri, May 22, 2020 at 3:29 AM rahasij wrote: > > Ramon Fried-4 wrote > > + if (strcmp((char *)pkt + i, "windowsize") == 0) { > > + tftp_windowsize = > > + simple_strtoul((char *)pkt + i + 11, > > + NULL, 10); > > + debug("windowsize = %s, %d\n", > > + (char *)pkt + i + 11, tftp_windowsize); > > + } > > + > > } > > -- > > 2.26.2 > > As per RFC2347, the option string is case insensitive. I fixed this for > other options in following patch > > https://lists.denx.de/pipermail/u-boot/2020-May/412472.html > > Please use strcasecmp() instead of strcmp(). > > As per RFC7440, the value received from server should be less than or equal > to the value proposed by client . This check should be added here, and error > packet must be generated in case of failure. > > Above patch implements ERR pkt generation and should be applied first. > > > > > -- > Sent from: http://u-boot.10912.n7.nabble.com/