Skip to contentSkip to conversation

tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH

PATCH Applied Maxim Petrov 3 participants 3 messages Nov 17, 2021

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH

Fix the wild bracket in the if clause leading to the error in the condition.

---
 tc/m_vlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tc/m_vlan.c +2 -2
index 221083df..1b2b1d51 100644
@@ -279,8 +279,8 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg)
 				    ETH_ALEN, 0, b1, sizeof(b1));
 			print_string(PRINT_ANY, "dst_mac", " dst_mac %s", b1);
 		}
-		if (tb[TCA_VLAN_PUSH_ETH_SRC &&
-		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN]) {
+		if (tb[TCA_VLAN_PUSH_ETH_SRC] &&
+		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN) {
 			ll_addr_n2a(RTA_DATA(tb[TCA_VLAN_PUSH_ETH_SRC]),
 				    ETH_ALEN, 0, b1, sizeof(b1));
 			print_string(PRINT_ANY, "src_mac", " src_mac %s", b1);
Signature · 1 line
2.25.1
#1 lore raw
Quoted 12 lines · On Wed, 17 Nov 2021 21:05:33 +0300 Maxim Petrov <[email protected]> wrote:

Fix the wild bracket in the if clause leading to the error in the condition.

---
 tc/m_vlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
tc/m_vlan.c +0 -0
index 221083df..1b2b1d51 100644

tc/m_vlan.c static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg) · line 286

Quoted 10 lines
tc/m_vlan.c +2 -2
@@ -279,8 +279,8 @@ static int print_vlan(struct action_util *au, FILE *f, struct rtattr *arg)
 				    ETH_ALEN, 0, b1, sizeof(b1));
 			print_string(PRINT_ANY, "dst_mac", " dst_mac %s", b1);
 		}
-		if (tb[TCA_VLAN_PUSH_ETH_SRC &&
-		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN]) {
+		if (tb[TCA_VLAN_PUSH_ETH_SRC] &&
+		       RTA_PAYLOAD(tb[TCA_VLAN_PUSH_ETH_SRC]) == ETH_ALEN) {
 			ll_addr_n2a(RTA_DATA(tb[TCA_VLAN_PUSH_ETH_SRC]),
 				    ETH_ALEN, 0, b1, sizeof(b1));
 			print_string(PRINT_ANY, "src_mac", " src_mac %s", b1);
Fixes d61167dd88b4 ("m_vlan: add pop_eth and push_eth actions")
#2 lore raw
In reply to Maxim Petrov
This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Hello:

This patch was applied to iproute2/iproute2.git (main) by Stephen Hemminger <[email protected]>:

Quoted 6 lines · On Wed, 17 Nov 2021 21:05:33 +0300 you wrote:

Fix the wild bracket in the if clause leading to the error in the condition.

---
 tc/m_vlan.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Here is the summary with links:
- [iproute2] tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH

    https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/commit/?id=0e949725908b

You are awesome, thank you!

Signature · 2 lines
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html