]> git.ipfire.org Git - thirdparty/iproute2.git/commitdiff
tc/m_vlan: fix print_vlan() conditional on TCA_VLAN_ACT_PUSH_ETH
authorMaxim Petrov <mmrmaximuzz@gmail.com>
Wed, 17 Nov 2021 18:05:33 +0000 (21:05 +0300)
committerStephen Hemminger <stephen@networkplumber.org>
Wed, 17 Nov 2021 19:13:12 +0000 (11:13 -0800)
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 <mmrmaximuzz@gmail.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
tc/m_vlan.c

index 221083dfc0daccc586ec6bdc10502b04e944717d..1b2b1d51ed2df9aecbb7a706577e82b0f00d194e 100644 (file)
@@ -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);