|
|
36cfb7 |
From 85bcdf3ca3a76ce3b4f62769aa64adcb1c849082 Mon Sep 17 00:00:00 2001
|
|
|
36cfb7 |
From: Andrea Claudi <aclaudi@redhat.com>
|
|
|
36cfb7 |
Date: Mon, 29 Apr 2019 20:09:13 +0200
|
|
|
36cfb7 |
Subject: [PATCH] tc: flower: No need to cache indev arg
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1465646
|
|
|
36cfb7 |
Upstream Status: iproute2.git commit ee474849c8511
|
|
|
36cfb7 |
|
|
|
36cfb7 |
commit ee474849c85116ec36e387882447f737ac3fdefb
|
|
|
36cfb7 |
Author: Phil Sutter <phil@nwl.cc>
|
|
|
36cfb7 |
Date: Mon Oct 2 13:46:36 2017 +0200
|
|
|
36cfb7 |
|
|
|
36cfb7 |
tc: flower: No need to cache indev arg
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Since addattrstrz() will copy the provided string into the attribute
|
|
|
36cfb7 |
payload, there is no need to cache the data.
|
|
|
36cfb7 |
|
|
|
36cfb7 |
Signed-off-by: Phil Sutter <phil@nwl.cc>
|
|
|
36cfb7 |
---
|
|
|
36cfb7 |
tc/f_flower.c | 5 +----
|
|
|
36cfb7 |
1 file changed, 1 insertion(+), 4 deletions(-)
|
|
|
36cfb7 |
|
|
|
36cfb7 |
diff --git a/tc/f_flower.c b/tc/f_flower.c
|
|
|
36cfb7 |
index e2c7daa0b8e03..34249254603ff 100644
|
|
|
36cfb7 |
--- a/tc/f_flower.c
|
|
|
36cfb7 |
+++ b/tc/f_flower.c
|
|
|
36cfb7 |
@@ -642,11 +642,8 @@ static int flower_parse_opt(struct filter_util *qu, char *handle,
|
|
|
36cfb7 |
} else if (matches(*argv, "skip_sw") == 0) {
|
|
|
36cfb7 |
flags |= TCA_CLS_FLAGS_SKIP_SW;
|
|
|
36cfb7 |
} else if (matches(*argv, "indev") == 0) {
|
|
|
36cfb7 |
- char ifname[IFNAMSIZ] = {};
|
|
|
36cfb7 |
-
|
|
|
36cfb7 |
NEXT_ARG();
|
|
|
36cfb7 |
- strncpy(ifname, *argv, sizeof(ifname) - 1);
|
|
|
36cfb7 |
- addattrstrz(n, MAX_MSG, TCA_FLOWER_INDEV, ifname);
|
|
|
36cfb7 |
+ addattrstrz(n, MAX_MSG, TCA_FLOWER_INDEV, *argv);
|
|
|
36cfb7 |
} else if (matches(*argv, "vlan_id") == 0) {
|
|
|
36cfb7 |
__u16 vid;
|
|
|
36cfb7 |
|
|
|
36cfb7 |
--
|
|
|
e138d9 |
2.21.0
|
|
|
36cfb7 |
|