On Sun, Jul 8, 2018 at 2:27 PM Qiaobin Fu <qiaob...@bu.edu> wrote:
> @@ -111,6 +114,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char 
> ***argv_p, int tca_id,
>                         }
>                         flags |= SKBEDIT_F_PTYPE;
>                         ok++;
> +               } else if (matches(*argv, "inheritdsfield") == 0) {
> +                       pure_flags |= SKBEDIT_F_INHERITDSFIELD;
> +                       ok++;
>                 } else if (matches(*argv, "help") == 0) {
>                         usage();
>                 } else {
[...]
> @@ -214,6 +224,11 @@ static int print_skbedit(struct action_util *au, FILE 
> *f, struct rtattr *arg)
>                 else
>                         print_uint(PRINT_ANY, "ptype", " ptype %u", ptype);
>         }
> +       if (tb[TCA_SKBEDIT_FLAGS] != NULL) {
> +               flags = RTA_DATA(tb[TCA_SKBEDIT_FLAGS]);
> +               if (*flags & SKBEDIT_F_INHERITDSFIELD)
> +                       fprintf(f, " inherit DS field ");
> +       }

Please align the output syntax with the input syntax. Traditionally
iproute2 command output can be just used for input, even though
it is no longer true now.

Reply via email to