netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH iproute2 v2] m_mirred: don't bail if the control action is missing
@ 2019-05-20  9:56 Paolo Abeni
  2019-05-20 13:05 ` Roman Mashak
  2019-05-22 18:52 ` Stephen Hemminger
  0 siblings, 2 replies; 3+ messages in thread
From: Paolo Abeni @ 2019-05-20  9:56 UTC (permalink / raw)
  To: stephen, netdev; +Cc: Jiri Pirko, Phil Sutter

The mirred act admits an optional control action, defaulting
to TC_ACT_PIPE. The parsing code currently emits an error message
if the control action is not provided on the command line, even
if the command itself completes with no error.

This change shuts down the error message, using the appropriate
parsing helper.

Fixes: e67aba559581 ("tc: actions: add helpers to parse and print control actions")
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
---
v1 -> v2:
 - add missing recipients, sorry for the unneeded duplicates to
   the initial, partial list
---
 tc/m_mirred.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/tc/m_mirred.c b/tc/m_mirred.c
index c7f7318b..23ba638a 100644
--- a/tc/m_mirred.c
+++ b/tc/m_mirred.c
@@ -202,7 +202,8 @@ parse_direction(struct action_util *a, int *argc_p, char ***argv_p,
 
 
 	if (p.eaction == TCA_EGRESS_MIRROR || p.eaction == TCA_INGRESS_MIRROR)
-		parse_action_control(&argc, &argv, &p.action, false);
+		parse_action_control_dflt(&argc, &argv, &p.action, false,
+					  TC_ACT_PIPE);
 
 	if (argc) {
 		if (iok && matches(*argv, "index") == 0) {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2019-05-22 18:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2019-05-20  9:56 [PATCH iproute2 v2] m_mirred: don't bail if the control action is missing Paolo Abeni
2019-05-20 13:05 ` Roman Mashak
2019-05-22 18:52 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).