]> git.ipfire.org Git - thirdparty/iw.git/commitdiff
iw: print 4ADDR attribute when dumping interface
authorAntonio Quartulli <a@unstable.cc>
Sat, 23 Mar 2019 09:39:14 +0000 (10:39 +0100)
committerJohannes Berg <johannes.berg@intel.com>
Fri, 29 Mar 2019 10:26:47 +0000 (11:26 +0100)
Print the value of the 4ADDR attribute when dumping the interface
status.

Signed-off-by: Antonio Quartulli <a@unstable.cc>
[print only when enabled]
Signed-off-by: Johannes Berg <johannes.berg@intel.com>
Change-Id: Ieaa5de972638e9c0a9b74fe1daf4aa86dba2c7fd

interface.c

index 712bbdcad283fa23192838f477d434edc4d21ef2..b69748278803b4ca29dbe5b03feefa29af5ebeb4 100644 (file)
@@ -447,6 +447,12 @@ static int print_iface_handler(struct nl_msg *msg, void *arg)
                printf("%s\tmulticast TXQ:%s\n", indent, buf);
        }
 
+       if (tb_msg[NL80211_ATTR_4ADDR]) {
+               uint8_t use_4addr = nla_get_u8(tb_msg[NL80211_ATTR_4ADDR]);
+               if (use_4addr)
+                       printf("%s\t4addr: on\n", indent);
+       }
+
        return NL_SKIP;
 }