|
| 1 | +diff --git a/man/teamd.conf.5 b/man/teamd.conf.5 |
| 2 | +index 350ffc9..dc913cd 100644 |
| 3 | +--- a/man/teamd.conf.5 |
| 4 | ++++ b/man/teamd.conf.5 |
| 5 | +@@ -248,7 +248,7 @@ Default: |
| 6 | + .RE |
| 7 | + .TP |
| 8 | + .BR "runner.min_ports " (int) |
| 9 | +-Specifies the minimum number of ports that must be active before asserting carrier in the master interface, value can be 1 \(en 255. |
| 10 | ++Specifies the minimum number of ports that must be active before asserting carrier in the master interface, value can be 1 \(en 1024. |
| 11 | + .RS 7 |
| 12 | + .PP |
| 13 | + Default: |
| 14 | +diff --git a/teamd/teamd_runner_lacp.c b/teamd/teamd_runner_lacp.c |
| 15 | +index 9354ebb..a901398 100644 |
| 16 | +--- a/teamd/teamd_runner_lacp.c |
| 17 | ++++ b/teamd/teamd_runner_lacp.c |
| 18 | +@@ -151,6 +151,7 @@ struct lacp { |
| 19 | + #define LACP_CFG_DFLT_FALLBACK false |
| 20 | + int min_ports; |
| 21 | + #define LACP_CFG_DFLT_MIN_PORTS 1 |
| 22 | ++#define LACP_CFG_DFLT_MIN_PORTS_MAX 1024 |
| 23 | + enum lacp_agg_select_policy agg_select_policy; |
| 24 | + #define LACP_CFG_DFLT_AGG_SELECT_POLICY LACP_AGG_SELECT_LACP_PRIO |
| 25 | + } cfg; |
| 26 | +@@ -493,7 +494,7 @@ static int lacp_load_config(struct teamd_context *ctx, struct lacp *lacp) |
| 27 | + err = teamd_config_int_get(ctx, &tmp, "$.runner.min_ports"); |
| 28 | + if (err) { |
| 29 | + lacp->cfg.min_ports = LACP_CFG_DFLT_MIN_PORTS; |
| 30 | +- } else if (tmp < 1 || tmp > UCHAR_MAX) { |
| 31 | ++ } else if (tmp < 1 || tmp > LACP_CFG_DFLT_MIN_PORTS_MAX) { |
| 32 | + teamd_log_err("\"min_ports\" value is out of its limits."); |
| 33 | + return -EINVAL; |
| 34 | + } else { |
0 commit comments