fsutils:ipcfg Fix range checking for PRTOCOL in bin mode

This commit is contained in:
David Sidrane 2020-09-30 12:10:09 -07:00 committed by patacongo
parent 16dc85417b
commit 17c34df3b9

View File

@ -551,7 +551,7 @@ int ipcfg_write(FAR const char *netdev, FAR const struct ipcfg_s *ipcfg)
/* Format and write the file */
if ((unsigned)ipcfg->proto == MAX_BOOTPROTO)
if ((unsigned)ipcfg->proto > MAX_BOOTPROTO)
{
fprintf(stderr, "ERROR: Unrecognized BOOTPROTO value: %d\n",
ipcfg->proto);