From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 6088BE776CB for ; Mon, 2 Oct 2023 23:40:11 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237250AbjJBXkM (ORCPT ); Mon, 2 Oct 2023 19:40:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59236 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229589AbjJBXkL (ORCPT ); Mon, 2 Oct 2023 19:40:11 -0400 Received: from mail-0301.mail-europe.com (mail-0301.mail-europe.com [188.165.51.139]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 119BDB8 for ; Mon, 2 Oct 2023 16:40:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=protonmail.com; s=protonmail3; t=1696290004; x=1696549204; bh=6DHdQbMvIWC+d7DLpgr//TLkTz6cWUQ8snqb9evmiZk=; h=Date:To:From:Cc:Subject:Message-ID:Feedback-ID:From:To:Cc:Date: Subject:Reply-To:Feedback-ID:Message-ID:BIMI-Selector; b=Y+TqzzD5G/+tu+YT+M5KZPXY0Jl900r1zX14HHdruI6VzYTerMctm6oL2w/e3jdmM nqo6J8DI2R0p0T6Ksj+bU30N4hDRUlbH7An5e+URedItk/07fyI00qTL9yD4bSK9bB hx2I54A20wPLEF5FiBVek26Wjwz6bI5YknDPE385VcsjV9b8nyCc+aq5OM9HtOK0bB j/ejWpx3aKBPkDmfJ/bJCko1BZ/5+ZUYHP328kIXiRYQkXS2sBfnuAova/qgiVRzbI 3RX99tcKAWkpI69XilgFqf5PwY/ma9IQzdzTFdWZBlVMAe8yfB7L+aRSuBW/tcrLMj F1iq1hTuzU5uQ== Date: Mon, 02 Oct 2023 23:39:55 +0000 To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org From: Michael Pratt Cc: "David S. Miller" , Eric Dumazet , Paolo Abeni , Rafal Milecki , Christian Marangi Subject: [PATCH v1 0/2] mac_pton: support more MAC address formats Message-ID: <20231002233946.16703-1-mcpratt@protonmail.com> Feedback-ID: 27397386:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently, mac_pton() strictly requires the standard ASCII MAC address form= at with colons as the delimiter, however, some hardware vendors don't store the address like that. If there is no delimiter, one could use strtoul() but that would leave out important checks to make sure that each character in the string is hexadecimal. This series adds support for other delimiters and lack of any delimiter to the mac_pton() function. Tested with Openwrt on a MIPS system (ar9344).