summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Stapp <mjs.ietf@gmail.com>2022-05-10 17:31:52 +0200
committerGitHub <noreply@github.com>2022-05-10 17:31:52 +0200
commit00358e444ee893778f7f21b189c65ed4de263d15 (patch)
tree5c7fdd367b153b395079c5c2e2a8f2610cfb9c0a
parentMerge pull request #11160 from opensourcerouting/feature/BGP_NOTIFY_CEASE_ADM... (diff)
parentzebra/interface.c: allow link-param delay min <= avg <= max (diff)
downloadfrr-00358e444ee893778f7f21b189c65ed4de263d15.tar.xz
frr-00358e444ee893778f7f21b189c65ed4de263d15.zip
Merge pull request #11155 from LabNConsulting/ziemba/link-delay-min-max
zebra bugfix interface link-param: allow delay min <= avg <= max (was: min<avg<max)
-rw-r--r--zebra/interface.c23
1 files changed, 17 insertions, 6 deletions
diff --git a/zebra/interface.c b/zebra/interface.c
index 677ec4650..d5f2dc4c9 100644
--- a/zebra/interface.c
+++ b/zebra/interface.c
@@ -3557,12 +3557,20 @@ DEFUN (link_params_delay,
uint8_t update = 0;
if (argc == 2) {
- /* Check new delay value against old Min and Max delays if set
+ /*
+ * Check new delay value against old Min and Max delays if set
+ *
+ * RFC 7471 Section 4.2.7:
+ * It is possible for min delay and max delay to be
+ * the same value.
+ *
+ * Therefore, it is also allowed that the average
+ * delay be equal to the min delay or max delay.
*/
if (IS_PARAM_SET(iflp, LP_MM_DELAY)
- && (delay <= iflp->min_delay || delay >= iflp->max_delay)) {
+ && (delay < iflp->min_delay || delay > iflp->max_delay)) {
vty_out(vty,
- "Average delay should be comprise between Min (%d) and Max (%d) delay\n",
+ "Average delay should be in range Min (%d) - Max (%d) delay\n",
iflp->min_delay, iflp->max_delay);
return CMD_WARNING_CONFIG_FAILED;
}
@@ -3580,10 +3588,13 @@ DEFUN (link_params_delay,
update = 1;
}
} else {
- /* Check new delays value coherency */
- if (delay <= low || delay >= high) {
+ /*
+ * Check new delays value coherency. See above note
+ * regarding average delay equal to min/max allowed
+ */
+ if (delay < low || delay > high) {
vty_out(vty,
- "Average delay should be comprise between Min (%d) and Max (%d) delay\n",
+ "Average delay should be in range Min (%d) - Max (%d) delay\n",
low, high);
return CMD_WARNING_CONFIG_FAILED;
}