From: Maxim Petrov Date: Wed, 17 Nov 2021 18:05:33 +0000 (+0300) Subject: tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH X-Git-Tag: v5.16.0~11 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e949725908b66dd9ad2cc27dc98fe782627ac8b;p=thirdparty%2Fiproute2.git 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. Fixes: d61167dd88b4 ("m_vlan: add pop_eth and push_eth actions") Signed-off-by: Maxim Petrov Signed-off-by: Stephen Hemminger --- diff --git a/tc/m_vlan.c b/tc/m_vlan.c index 221083dfc..1b2b1d51e 100644 --- a/tc/m_vlan.c +++ b/tc/m_vlan.c @@ -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);