]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc: pedit: Fix layered op parsing
authorPhil Sutter <phil@nwl.cc>
Wed, 2 Mar 2016 11:20:29 +0000 (12:20 +0100)
committerStephen Hemminger <stephen@networkplumber.org>
Sun, 6 Mar 2016 20:53:11 +0000 (12:53 -0800)
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 <phil@nwl.cc>
tc/m_pedit.c

index 86eb0ca3fbb38a4bd421c120efbe6fc12ac3cfb8..26272d3cc1ff49d696005c18b2b6685c625410a2 100644 (file)
@@ -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");