@@ -25,6 +25,7 @@ enum {
enum {
TC_CT_COMMIT,
+ TC_CT_FORCE,
__TC_CT_MAX
};
#define TC_CT_MAX (__TC_CT_MAX - 1)
@@ -27,7 +27,7 @@ static void
explain(void)
{
fprintf(stderr,
- "Usage: ct [mark <mark>] [zone <zone>] [label <label>] [chain <chain>] [commit]\n"
+ "Usage: ct [mark <mark>] [zone <zone>] [label <label>] [chain <chain>] [commit [force]]\n"
"where:\n");
}
@@ -232,6 +232,13 @@ out:
flags |= BIT(TC_CT_COMMIT);
goto again;
}
+ if (!matches(*argv, "force")) {
+ if (!(flags & BIT(TC_CT_COMMIT)))
+ goto help;
+ NEXT_ARG_FWD();
+ flags |= BIT(TC_CT_FORCE);
+ goto again;
+ }
/* if (!matches(*argv, "state")) {
NEXT_ARG();
ct_parse_u8(*argv,
@@ -253,6 +260,7 @@ out:
if (!matches(*argv, "action"))
goto out;
if (!matches(*argv, "help")) {
+help:
usage();
} else {
fprintf(stderr, "ct option not supported %s\n", *argv);
Signed-off-by: Marcelo Ricardo Leitner <mleitner@redhat.com> --- include/uapi/linux/tc_act/tc_ct.h | 1 + tc/m_ct.c | 10 +++++++++- 2 files changed, 10 insertions(+), 1 deletion(-)