Blob Blame History Raw
From 8d988174bf4f103837c0acda1ee7218b1debcbe6 Mon Sep 17 00:00:00 2001
From: Phil Sutter <psutter@redhat.com>
Date: Fri, 17 Mar 2017 13:24:16 +0100
Subject: [PATCH] tc: flower: Fix flower output for src and dst ports

Bugzilla: https://bugzilla.redhat.com/show_bug.cgi?id=1422629
Upstream Status: iproute2.git commit b2141de1ad985

commit b2141de1ad98517ffecc1feb99800cd36a26fd22
Author: Roi Dayan <roid@mellanox.com>
Date:   Sun Jan 15 16:23:49 2017 +0200

    tc: flower: Fix flower output for src and dst ports

    This fix a missing use case after the introduction of enum flower_endpoint.

    Fixes: 6910d65661a3 ("tc: flower: introduce enum flower_endpoint")
    Signed-off-by: Roi Dayan <roid@mellanox.com>
    Signed-off-by: Paul Blakey <paulb@mellanox.com>
---
 tc/f_flower.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tc/f_flower.c b/tc/f_flower.c
index 0623ab6..a3178a0 100644
--- a/tc/f_flower.c
+++ b/tc/f_flower.c
@@ -821,10 +821,10 @@ static int flower_print_opt(struct filter_util *qu, FILE *f,
 			     tb[TCA_FLOWER_KEY_IPV6_SRC],
 			     tb[TCA_FLOWER_KEY_IPV6_SRC_MASK]);
 
-	nl_type = flower_port_attr_type(ip_proto, false);
+	nl_type = flower_port_attr_type(ip_proto, FLOWER_ENDPOINT_DST);
 	if (nl_type >= 0)
 		flower_print_port(f, "dst_port", tb[nl_type]);
-	nl_type = flower_port_attr_type(ip_proto, true);
+	nl_type = flower_port_attr_type(ip_proto, FLOWER_ENDPOINT_SRC);
 	if (nl_type >= 0)
 		flower_print_port(f, "src_port", tb[nl_type]);
 
-- 
1.8.3.1