diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-14 17:57:17 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-17 11:02:56 +0200 |
| commit | 2e2dc4f024312b7351b3d7e964fed42895fd123e (patch) | |
| tree | 8bb5893fb45a61f42b7e34460703aeaaaa7b7a96 /pceplib/pcep_utils_queue.c | |
| parent | fd30c2467a9a3afc615923af64f5de91937d268f (diff) | |
lib,zebra: do not enable link-params when a link-params command fails
A given interface has no enabled link-params context. If a link-params
configuration command fails, the link-params is wrongly enabled:
> r4(config-link-params)# no enable
> r4(config-link-params)# delay
> (0-16777215) Average delay in micro-second as decimal (0...16777215)
> r4(config-link-params)# delay 50 min 300 max 500
> Average delay should be comprise between Min (300) and Max (500) delay
> r4(config-link-params)# do sh run zebra
> (...)
> interface eth-rt1
> link-params
> enable
> exit-link-params
link-params are enabled if and only if the interface structure has a
valid link_params pointer. Before checking the command validity,
if_link_params_get() is called to retrieve the link-params pointer.
However, this function initializes the pointer if it is NULL.
Only use if_link_params_get() to retrieve the pointer to avoid
confusion. In command setting functions, initialize the link_params
pointer if needed only after the validation of the command.
Fixes: 16f1b9e ("Update Traffic Engineering Support for OSPFD")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'pceplib/pcep_utils_queue.c')
0 files changed, 0 insertions, 0 deletions
