netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Pratt <mcpratt@protonmail.com>
To: netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Paolo Abeni <pabeni@redhat.com>, Rafal Milecki <zajec5@gmail.com>,
	Christian Marangi <ansuelsmth@gmail.com>
Subject: [PATCH v1 0/2] mac_pton: support more MAC address formats
Date: Mon, 02 Oct 2023 23:39:55 +0000	[thread overview]
Message-ID: <20231002233946.16703-1-mcpratt@protonmail.com> (raw)

Currently, mac_pton() strictly requires the standard ASCII MAC address format
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).




             reply	other threads:[~2023-10-02 23:40 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-02 23:39 Michael Pratt [this message]
2023-10-02 23:40 ` [PATCH 1/2] mac_pton: support MAC addresses with other delimiters Michael Pratt
2023-10-03 16:58   ` Stephen Hemminger
2023-10-02 23:40 ` [PATCH 2/2] mac_pton: support MAC addresses without delimiters Michael Pratt
2023-10-03 14:17 ` [PATCH v1 0/2] mac_pton: support more MAC address formats Simon Horman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20231002233946.16703-1-mcpratt@protonmail.com \
    --to=mcpratt@protonmail.com \
    --cc=ansuelsmth@gmail.com \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=zajec5@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).