public inbox for netdev@vger.kernel.org
 help / color / mirror / Atom feed
From: Petr Oros <poros@redhat.com>
To: netdev@vger.kernel.org
Cc: dsahern@kernel.org, stephen@networkplumber.org,
	Petr Oros <poros@redhat.com>
Subject: [PATCH iproute2-next 1/4] dpll: fix pin id-get type filter parsing
Date: Tue, 24 Feb 2026 10:12:40 +0100	[thread overview]
Message-ID: <20260224091243.58501-2-poros@redhat.com> (raw)
In-Reply-To: <20260224091243.58501-1-poros@redhat.com>

dpll_parse_attr_enum() expects the keyword to be already consumed,
but cmd_pin_id_get() used dpll_argv_match() which does not advance
the argument pointer. This caused the parser to read the keyword
"type" as the enum value instead of the actual type (e.g. "gnss").

Use dpll_argv_match_inc() to properly consume the keyword before
parsing the value.

Fixes: 656cfc3ce05b ("dpll: Add dpll command")
Signed-off-by: Petr Oros <poros@redhat.com>
---
 dpll/dpll.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/dpll/dpll.c b/dpll/dpll.c
index 624567c2a826fd..0effa5a9c67e72 100644
--- a/dpll/dpll.c
+++ b/dpll/dpll.c
@@ -1768,7 +1768,7 @@ static int cmd_pin_id_get(struct dpll *dpll)
 			if (dpll_parse_attr_str(dpll, nlh, "package-label",
 						DPLL_A_PIN_PACKAGE_LABEL))
 				return -EINVAL;
-		} else if (dpll_argv_match(dpll, "type")) {
+		} else if (dpll_argv_match_inc(dpll, "type")) {
 			if (dpll_parse_attr_enum(dpll, nlh, "type",
 						 DPLL_A_PIN_TYPE,
 						 dpll_parse_pin_type))
-- 
2.52.0


  reply	other threads:[~2026-02-24  9:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-02-24  9:12 [PATCH iproute2-next 0/4] dpll: add client-side filtering Petr Oros
2026-02-24  9:12 ` Petr Oros [this message]
2026-02-24  9:12 ` [PATCH iproute2-next 2/4] dpll: add client-side filtering for device show Petr Oros
2026-02-24  9:12 ` [PATCH iproute2-next 3/4] dpll: add client-side filtering for pin show Petr Oros
2026-02-24  9:12 ` [PATCH iproute2-next 4/4] dpll: add pin filtering by parent-device and parent-pin Petr Oros
2026-03-02 16:20 ` [PATCH iproute2-next 0/4] dpll: add client-side filtering patchwork-bot+netdevbpf

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=20260224091243.58501-2-poros@redhat.com \
    --to=poros@redhat.com \
    --cc=dsahern@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=stephen@networkplumber.org \
    /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