On 7/14/18 1:10 AM, Qiaobin Fu wrote: > @@ -156,6 +162,9 @@ parse_skbedit(struct action_util *a, int *argc_p, char > ***argv_p, int tca_id, > if (flags & SKBEDIT_F_PTYPE) > addattr_l(n, MAX_MSG, TCA_SKBEDIT_PTYPE, > &ptype, sizeof(ptype)); > + if (pure_flags != 0) > + addattr_l(n, MAX_MSG, TCA_SKBEDIT_FLAGS, > + &pure_flags, sizeof(pure_flags));
I realize this follows suit with the current code, but tc needs to use the helpers -- like addattr64 instead of addattr_l > addattr_nest_end(n, tail); > > *argc_p = argc; > @@ -214,6 +223,13 @@ 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) { > + __u64 *flags = RTA_DATA(tb[TCA_SKBEDIT_FLAGS]); and rta_getattr_u64 instead of RTA_DATA. > + > + if (*flags & SKBEDIT_F_INHERITDSFIELD) > + print_null(PRINT_ANY, "inheritdsfield", " %s", > + "inheritdsfield"); > + } > > print_action_control(f, " ", p->action, ""); > >