From: Phil Sutter Date: Wed, 2 Mar 2016 11:20:29 +0000 (+0100) Subject: tc: pedit: Fix layered op parsing X-Git-Tag: v4.5.0~3 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ec0ceeec4954b1a5439ec3684460e8385454de90;p=thirdparty%2Fiproute2.git tc: pedit: Fix layered op parsing After lookup of the layered op submodule, pedit would pass argv and argc including the layered op identifier at first position which confused the submodule parser. Fix this by calling NEXT_ARG() before calling the parse_peopt() callback. Signed-off-by: Phil Sutter --- diff --git a/tc/m_pedit.c b/tc/m_pedit.c index 86eb0ca3f..26272d3cc 100644 --- a/tc/m_pedit.c +++ b/tc/m_pedit.c @@ -422,6 +422,7 @@ parse_munge(int *argc_p, char ***argv_p,struct tc_pedit_sel *sel) p = get_pedit_kind(k); if (NULL == p) goto bad_val; + NEXT_ARG(); res = p->parse_peopt(&argc, &argv, sel,&tkey); if (res < 0) { fprintf(stderr,"bad pedit parsing\n");