From: Antonio Quartulli
Date: Sat, 23 Mar 2019 09:39:14 +0000 (+0100)
Subject: iw: print 4ADDR attribute when dumping interface
X-Git-Tag: v5.3~25
X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e99bc38e18c0ea8961432d6c42b4d723f1ae3442;p=thirdparty%2Fiw.git
iw: print 4ADDR attribute when dumping interface
Print the value of the 4ADDR attribute when dumping the interface
status.
Signed-off-by: Antonio Quartulli
[print only when enabled]
Signed-off-by: Johannes Berg
Change-Id: Ieaa5de972638e9c0a9b74fe1daf4aa86dba2c7fd
---
diff --git a/interface.c b/interface.c
index 712bbdc..b697482 100644
--- a/interface.c
+++ b/interface.c
@@ -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;
}