From patchwork Thu Nov 22 16:06:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Goldschmidt X-Patchwork-Id: 1001866 X-Patchwork-Delegate: joe.hershberger@gmail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="ao2UnR9T"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 43147t5BmKz9s0t for ; Fri, 23 Nov 2018 03:06:50 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 62C91C220F5; Thu, 22 Nov 2018 16:06:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM, RCVD_IN_MSPIKE_H2, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 1F2B6C220DE; Thu, 22 Nov 2018 16:06:47 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 0C081C220DE; Thu, 22 Nov 2018 16:06:45 +0000 (UTC) Received: from mail-wm1-f65.google.com (mail-wm1-f65.google.com [209.85.128.65]) by lists.denx.de (Postfix) with ESMTPS id B19C3C220D6 for ; Thu, 22 Nov 2018 16:06:44 +0000 (UTC) Received: by mail-wm1-f65.google.com with SMTP id y139so9409135wmc.5 for ; Thu, 22 Nov 2018 08:06:44 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id; bh=0EP1ZpqcP6WmQxZWGhWy4Cm8fwCOWVMRxhxiglm95yc=; b=ao2UnR9TnhH7BEMtB2jY+PISzeha/a2IYa/wDeanEElzAaiWYvm75Rjhex4tPT4R1U hgq8MAdPgSuh7RhNaRD8hGYle5yUgN9RzP8lE3viPAAbgIC0rj8Y2F6JVC1RsBUon1UZ yHzApchF8buNbeOWEzive2L/l38smkaUH5EJDJrDw0OQ8it/RFzzx7AqkS5/r9fIpoDE jfsncmCQ0gfqrucM1eQUlooHWJOgaZFa2iGoiHaE9x779eQ4GBwiqmDz1HLOogVr5s7Z iC+jo4WGJ5NfL+PmpfpiAOG6TUkiyCd7q+vpuDkHsbRI+xd0NfZvLKW9V6vybLImAnjL ccqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=0EP1ZpqcP6WmQxZWGhWy4Cm8fwCOWVMRxhxiglm95yc=; b=iNpDEU3mT0GKw/NddClMPjzfztiq2EGDWRK8h/VECsQAKCLSfN8MSxuOzSehXmZeGg oHJCrjhT/9/uK5VicKcmGeuFe7aX3pDnumbcJRtZuHBBCXi7CoiRQvrjj23y1xhsYptJ xrDmMFb7VA5EA2+gs1xS/a/vBWRNd2CFJGcEf2ArKXO5Fz1MQNrx/OgH5Lr2ShFo2miT D4gV4aNXDlM4tgIeFc7a1WHAeDKcJsB92l4z1B8a8GWdVY1TPZH/ucgpB9IALgsE40nv 9QkukVdSdcBmIz46U264jW3Q8zHku9hUM+R/OWc/9wmhe5X7IbsVRcGJ0W0nFXxyVUvG MzSw== X-Gm-Message-State: AGRZ1gJXQn2BvCvFI+duQV7pp0RhNORhurD5Nw4PIAbhM9mI70zJandk 61f+oZwUdscxvsvTOs5QPSDDl/W7 X-Google-Smtp-Source: AJdET5enNHP6yjxCmPX+eJQL//aGqt96U5DJoziW7h5TuTtpwC8wbdfJH3KEauAMqE94xrnXu+O6/Q== X-Received: by 2002:a1c:8fc2:: with SMTP id r185mr10104136wmd.54.1542902804398; Thu, 22 Nov 2018 08:06:44 -0800 (PST) Received: from ubuntu.home ([2a02:8071:6a3:700:2cd5:fca:15fc:93d5]) by smtp.gmail.com with ESMTPSA id z3-v6sm3144382wma.6.2018.11.22.08.06.43 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 22 Nov 2018 08:06:43 -0800 (PST) From: Simon Goldschmidt To: Joe Hershberger , u-boot@lists.denx.de Date: Thu, 22 Nov 2018 17:06:39 +0100 Message-Id: <20181122160639.4586-1-simon.k.r.goldschmidt@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [U-Boot] [PATCH] net: fix env flags for eth10addr and above X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" With CONFIG_REGEX enabled, ETHADDR_WILDCARD is set up for up to 10 interfaces (0..9) as the number can only have one digit. On boards with more than 10 interfaces, this leads to the protection and format checks being absent for eth10addr and above. Fix this by changing ETHADDR_WILDCARD from "\\d?" to "\\d*" to allow more than one digit. Signed-off-by: Simon Goldschmidt Acked-by: Joe Hershberger --- include/env_flags.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/env_flags.h b/include/env_flags.h index cc2c34f939..23744e395c 100644 --- a/include/env_flags.h +++ b/include/env_flags.h @@ -38,7 +38,7 @@ enum env_flags_varaccess { #ifdef CONFIG_CMD_NET #ifdef CONFIG_REGEX -#define ETHADDR_WILDCARD "\\d?" +#define ETHADDR_WILDCARD "\\d*" #else #define ETHADDR_WILDCARD #endif