naccyde / rpms / iproute

Forked from rpms/iproute 5 months ago
Clone

Blame SOURCES/0034-tc-add-NLA_F_NESTED-flag-to-all-actions-options-nest.patch

07a51b
From bf795d2418ee298ddc73171829d6dc4914c22a46 Mon Sep 17 00:00:00 2001
07a51b
From: Andrea Claudi <aclaudi@redhat.com>
07a51b
Date: Tue, 9 Jun 2020 15:45:56 +0200
07a51b
Subject: [PATCH] tc: add NLA_F_NESTED flag to all actions options nested block
07a51b
07a51b
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1844637
07a51b
Upstream Status: iproute2.git commit 18aa9f5583e94
07a51b
07a51b
commit 18aa9f5583e94abc7204b2376b819ede1180da97
07a51b
Author: Paul Blakey <paulb@mellanox.com>
07a51b
Date:   Thu Jul 11 11:14:25 2019 +0300
07a51b
07a51b
    tc: add NLA_F_NESTED flag to all actions options nested block
07a51b
07a51b
    Strict netlink validation now requires this flag on all nested
07a51b
    attributes, add it for action options.
07a51b
07a51b
    Signed-off-by: Paul Blakey <paulb@mellanox.com>
07a51b
    Signed-off-by: David Ahern <dsahern@gmail.com>
07a51b
---
07a51b
 tc/m_action.c | 3 ++-
07a51b
 1 file changed, 2 insertions(+), 1 deletion(-)
07a51b
07a51b
diff --git a/tc/m_action.c b/tc/m_action.c
07a51b
index c46aeaafa8ebf..4da810c8c0aa7 100644
07a51b
--- a/tc/m_action.c
07a51b
+++ b/tc/m_action.c
07a51b
@@ -214,7 +214,8 @@ done0:
07a51b
 			tail = addattr_nest(n, MAX_MSG, ++prio);
07a51b
 			addattr_l(n, MAX_MSG, TCA_ACT_KIND, k, strlen(k) + 1);
07a51b
 
07a51b
-			ret = a->parse_aopt(a, &argc, &argv, TCA_ACT_OPTIONS,
07a51b
+			ret = a->parse_aopt(a, &argc, &argv,
07a51b
+					    TCA_ACT_OPTIONS | NLA_F_NESTED,
07a51b
 					    n);
07a51b
 
07a51b
 			if (ret < 0) {
07a51b
-- 
07a51b
2.26.2
07a51b