|
|
cd1737 |
From dbc597c9d1e0e65cc9d989d8057f9a083c2f5779 Mon Sep 17 00:00:00 2001
|
|
|
cd1737 |
From: Phil Sutter <psutter@redhat.com>
|
|
|
cd1737 |
Date: Fri, 15 Dec 2017 16:13:46 +0100
|
|
|
cd1737 |
Subject: [PATCH] tc: fix command "tc actions del" hang issue
|
|
|
cd1737 |
|
|
|
cd1737 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1526394
|
|
|
cd1737 |
Upstream Status: iproute2.git commit 83cf5bc73b858
|
|
|
cd1737 |
|
|
|
cd1737 |
commit 83cf5bc73b858608d59c3c6126a9f37e793e15dd
|
|
|
cd1737 |
Author: Chris Mi <chrism@mellanox.com>
|
|
|
cd1737 |
Date: Thu Dec 14 18:09:00 2017 +0900
|
|
|
cd1737 |
|
|
|
cd1737 |
tc: fix command "tc actions del" hang issue
|
|
|
cd1737 |
|
|
|
cd1737 |
If command is RTM_DELACTION, a non-NULL pointer is passed to rtnl_talk().
|
|
|
cd1737 |
Then flag NLM_F_ACK is not set on n->nlmsg_flags and netlink_ack() will
|
|
|
cd1737 |
not be called. Command tc will wait for the reply for ever.
|
|
|
cd1737 |
|
|
|
cd1737 |
Fixes: 86bf43c7c2fd ("lib/libnetlink: update rtnl_talk to support malloc buff at run time")
|
|
|
cd1737 |
Reviewed-by: Jiri Pirko <jiri@mellanox.com>
|
|
|
cd1737 |
Signed-off-by: Chris Mi <chrism@mellanox.com>
|
|
|
cd1737 |
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
|
|
|
cd1737 |
---
|
|
|
cd1737 |
tc/m_action.c | 2 +-
|
|
|
cd1737 |
1 file changed, 1 insertion(+), 1 deletion(-)
|
|
|
cd1737 |
|
|
|
cd1737 |
diff --git a/tc/m_action.c b/tc/m_action.c
|
|
|
cd1737 |
index 90b2a11..7cfd9e0 100644
|
|
|
cd1737 |
--- a/tc/m_action.c
|
|
|
cd1737 |
+++ b/tc/m_action.c
|
|
|
cd1737 |
@@ -507,7 +507,7 @@ static int tc_action_gd(int cmd, unsigned int flags, int *argc_p, char ***argv_p
|
|
|
cd1737 |
|
|
|
cd1737 |
req.n.nlmsg_seq = rth.dump = ++rth.seq;
|
|
|
cd1737 |
|
|
|
cd1737 |
- if (rtnl_talk(&rth, &req.n, &ans) < 0) {
|
|
|
cd1737 |
+ if (rtnl_talk(&rth, &req.n, cmd == RTM_DELACTION ? NULL : &ans) < 0) {
|
|
|
cd1737 |
fprintf(stderr, "We have an error talking to the kernel\n");
|
|
|
cd1737 |
return 1;
|
|
|
cd1737 |
}
|
|
|
cd1737 |
--
|
|
|
cd1737 |
1.8.3.1
|
|
|
cd1737 |
|