@@ -452,6 +452,8 @@ enum {
IFLA_BOND_SLAVE_PERM_HWADDR,
IFLA_BOND_SLAVE_QUEUE_ID,
IFLA_BOND_SLAVE_AD_AGGREGATOR_ID,
+ IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE,
+ IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE,
__IFLA_BOND_SLAVE_MAX,
};
@@ -78,6 +78,14 @@ static void bond_slave_print_opt(struct link_util *lu, FILE *f, struct rtattr *t
if (tb[IFLA_BOND_SLAVE_AD_AGGREGATOR_ID])
fprintf(f, "ad_aggregator_id %d ",
rta_getattr_u16(tb[IFLA_BOND_SLAVE_AD_AGGREGATOR_ID]));
+
+ if (tb[IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE])
+ fprintf(f, "ad_actor_oper_port_state %d\n",
+ rta_getattr_u8(tb[IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE]));
+
+ if (tb[IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE])
+ fprintf(f, "ad_partner_oper_port_state %d\n",
+ rta_getattr_u16(tb[IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE]));
}
static int bond_slave_parse_opt(struct link_util *lu, int argc, char **argv,
This patch adds support to retrieve the new bond slave attributes: IFLA_BOND_SLAVE_AD_ACTOR_OPER_PORT_STATE IFLA_BOND_SLAVE_AD_PARTNER_OPER_PORT_STATE which are read-only. This patch also adds the linux/if_link.h definitions. Signed-off-by: Nikolay Aleksandrov <razor@blackwall.org> --- include/linux/if_link.h | 2 ++ ip/iplink_bond_slave.c | 8 ++++++++ 2 files changed, 10 insertions(+)