diff options
author | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-09 16:23:39 +0200 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2019-04-09 16:23:39 +0200 |
commit | 94a14ceffe8ccd65d175ed5661868cffb9f37339 (patch) | |
tree | bf16c20baf03019a64cd7e0303da42de0f52acf7 /libnm-core | |
parent | e4f2c2d8b2a939209ead2606c79c9f83fbbfd81c (diff) | |
download | NetworkManager-lr/tc-attrs.tar.gz |
tc/tfilter: add mirred actionlr/tc-attrs
Diffstat (limited to 'libnm-core')
-rw-r--r-- | libnm-core/nm-utils.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libnm-core/nm-utils.c b/libnm-core/nm-utils.c index cbeeae05a1..4e0bd97938 100644 --- a/libnm-core/nm-utils.c +++ b/libnm-core/nm-utils.c @@ -2561,6 +2561,15 @@ static const NMVariantAttributeSpec * const tc_action_simple_attribute_spec[] = NULL, }; +static const NMVariantAttributeSpec * const tc_action_mirred_attribute_spec[] = { + TC_ATTR_SPEC_PTR ("egress", G_VARIANT_TYPE_BOOLEAN, TRUE, FALSE, 0 ), + TC_ATTR_SPEC_PTR ("ingress", G_VARIANT_TYPE_BOOLEAN, TRUE, FALSE, 0 ), + TC_ATTR_SPEC_PTR ("mirror", G_VARIANT_TYPE_BOOLEAN, TRUE, FALSE, 0 ), + TC_ATTR_SPEC_PTR ("redirect", G_VARIANT_TYPE_BOOLEAN, TRUE, FALSE, 0 ), + TC_ATTR_SPEC_PTR ("dev", G_VARIANT_TYPE_STRING, TRUE, FALSE, 'a' ), + NULL, +}; + static const NMVariantAttributeSpec * const tc_action_attribute_spec[] = { TC_ATTR_SPEC_PTR ("kind", G_VARIANT_TYPE_STRING, TRUE, FALSE, 'a' ), TC_ATTR_SPEC_PTR ("", G_VARIANT_TYPE_STRING, TRUE, TRUE, 'a' ), @@ -2665,6 +2674,8 @@ nm_utils_tc_action_from_str (const char *str, GError **error) kind = g_variant_get_string (variant, NULL); if (strcmp (kind, "simple") == 0) attrs = tc_action_simple_attribute_spec; + else if (strcmp (kind, "mirred") == 0) + attrs = tc_action_mirred_attribute_spec; else attrs = NULL; |