diff --git a/src/network/networkctl.c b/src/network/networkctl.c index 70adf4c73bb..5a348ef715e 100644 --- a/src/network/networkctl.c +++ b/src/network/networkctl.c @@ -120,6 +120,7 @@ typedef struct LinkInfo { unsigned short iftype; struct ether_addr mac_address; struct ether_addr permanent_mac_address; + uint32_t master; uint32_t mtu; uint32_t min_mtu; uint32_t max_mtu; @@ -342,6 +343,8 @@ static int decode_link(sd_netlink_message *m, LinkInfo *info, char **patterns, b return log_oom(); } + (void) sd_netlink_message_read_u32(m, IFLA_MASTER, &info->master); + /* fill kind info */ (void) decode_netdev(m, info); @@ -1354,6 +1357,15 @@ static int link_status_one( return table_log_add_error(r); } + if (info->master > 0) { + r = table_add_many(table, + TABLE_EMPTY, + TABLE_STRING, "Master:", + TABLE_IFINDEX, info->master); + if (r < 0) + return table_log_add_error(r); + } + if (streq_ptr(info->netdev_kind, "bridge")) { r = table_add_many(table, TABLE_EMPTY,