From: Jiri Pirko Date: Tue, 26 Nov 2024 09:08:27 +0000 (+0100) Subject: devlink: do dry parse for extended handle with selector X-Git-Tag: v6.13.0~12 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=8c4918859e4ae589bfd6241a1d83902f6e76f6b3;p=thirdparty%2Fiproute2.git devlink: do dry parse for extended handle with selector When parsing with selector, there's a list of extended handles (devname/busname/x) which require special treatment. DL_OPT_HANDLEP is one of them. The code tries to parse devname/busname handle and in case it is successful, it goes the "dump" way. However if it's not, parsing is directly done. That is wrong, as the options may still be incomplete. Do break in that case instead allowing to do dry parse and possibly go the "dump" way in case the option list is not complete. Fixes: 70faecdca8f5 ("devlink: implement dump selector for devlink objects show commands") Signed-off-by: Jiri Pirko Signed-off-by: Stephen Hemminger --- diff --git a/devlink/devlink.c b/devlink/devlink.c index abe96f34..bba1bbf1 100644 --- a/devlink/devlink.c +++ b/devlink/devlink.c @@ -2410,7 +2410,7 @@ static int dl_argv_parse_with_selector(struct dl *dl, uint16_t *flags, o_optional); if (err == -ENOENT || !err) goto dump_parse; - goto do_parse; + break; } }