@@ -1186,6 +1195,16 @@ static int u32_parse_opt(struct filter_util *qu, char *handle,
if (sel_ok)
addattr_l(n, MAX_MSG, TCA_U32_SEL, &sel,
sizeof(sel.sel) + sel.sel.nkeys * sizeof(struct tc_u32_key));
+
+ if (flags) {
+ if (!(flags ^ (TCA_CLS_FLAGS_SKIP_HW | TCA_CLS_FLAGS_SKIP_SW))) {
+ fprintf(stderr, "skip_hw and skip_sw are mutually "
+ "exclusive flags. Only one can be set\n");
+ return -1;
+ }
+ addattr_l(n, MAX_MSG, TCA_U32_FLAGS, &flags, 4);
+ }
+
tail->rta_len = (void *) NLMSG_TAIL(n) - (void *) tail;
return 0;
}