mirror of
https://gitlab.freedesktop.org/NetworkManager/NetworkManager.git
synced 2026-05-04 14:08:19 +02:00
libnm-core: pass variant-attribute-spec for tc actions
This commit is contained in:
parent
4599be093e
commit
7c60895d1e
1 changed files with 12 additions and 2 deletions
|
|
@ -2591,11 +2591,21 @@ _string_append_tc_action (GString *string, NMTCAction *action, GError **error)
|
|||
{
|
||||
const char *kind = nm_tc_action_get_kind (action);
|
||||
gs_free char *str = NULL;
|
||||
const NMVariantAttributeSpec *const *attrs;
|
||||
|
||||
if (nm_streq (kind, "simple"))
|
||||
attrs = tc_action_simple_attribute_spec;
|
||||
else if (nm_streq (kind, "mirred"))
|
||||
attrs = tc_action_mirred_attribute_spec;
|
||||
else
|
||||
attrs = NULL;
|
||||
|
||||
|
||||
g_string_append (string, kind);
|
||||
|
||||
str = nm_utils_format_variant_attributes (_nm_tc_action_get_attributes (action),
|
||||
' ', ' ');
|
||||
str = _nm_utils_format_variant_attributes (_nm_tc_action_get_attributes (action),
|
||||
attrs,
|
||||
' ', ' ');
|
||||
if (str) {
|
||||
g_string_append_c (string, ' ');
|
||||
g_string_append (string, str);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue