On 8/1/21 9:02 PM, Hangbin Liu wrote:
quoted hunk ↗ jump to hunk
@@ -316,6 +324,13 @@ static int bond_parse_opt(struct link_util *lu, int argc, char **argv,
addattr32(n, 1024, IFLA_BOND_PACKETS_PER_SLAVE,
packets_per_slave);
+ } else if (matches(*argv, "lacp_active") == 0) {
+ NEXT_ARG();
+ if (get_index(lacp_active_tbl, *argv) < 0)
+ invarg("invalid lacp_active", *argv);
+
+ lacp_active = get_index(lacp_active_tbl, *argv);
+ addattr8(n, 1024, IFLA_BOND_AD_LACP_ACTIVE, lacp_active);
} else if (matches(*argv, "lacp_rate") == 0) {
The new argument needs to go after the older "lacp_rate" since it uses
matches. Also, let's stop using matches and move to a full strcmp for
new options.