diff options
| author | Igor Ryzhov <iryzhov@nfware.com> | 2021-02-09 21:38:45 +0300 |
|---|---|---|
| committer | Igor Ryzhov <iryzhov@nfware.com> | 2021-02-09 21:38:45 +0300 |
| commit | 966806294b168fdc7bbd46797c3f0a66b939f00e (patch) | |
| tree | af927f417e785231094e09294884246a696f7b13 /pceplib/pcep_utils_queue.c | |
| parent | d887c7bf04f08b37ec122587f11cd2079cb22bd7 (diff) | |
vrf: mark vrf as configured when entering vrf node
The VRF must be marked as configured when user enters "vrf NAME" command.
Otherwise, the following problem occurs:
`ip link add red type vrf table 1`
VRF structure is allocated.
`vtysh -c "conf t" -c "vrf red"`
`lib_vrf_create` is called, and pointer to the VRF structure is stored
to the nb_config_entry.
`ip link del red`
VRF structure is freed (because it is not marked as configured), but
the pointer is still stored in the nb_config_entry.
`vtysh -c "conf t" -c "no vrf red"`
Nothing happens, because VRF structure doesn't exist. It means that
`lib_vrf_destroy` is not called, and nb_config_entry still exists in
the running config with incorrect pointer.
`ip link add red type vrf table 1`
New VRF structure is allocated.
`vtysh -c "conf t" -c "vrf red"`
`lib_vrf_create` is NOT called, because the nb_config_entry for that
VRF name still exists in the running config.
After that all NB commands for this VRF will use incorrect pointer to
the freed VRF structure.
Signed-off-by: Igor Ryzhov <iryzhov@nfware.com>
Diffstat (limited to 'pceplib/pcep_utils_queue.c')
0 files changed, 0 insertions, 0 deletions
