diff options
| author | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-14 17:57:20 +0200 |
|---|---|---|
| committer | Louis Scalbert <louis.scalbert@6wind.com> | 2022-10-17 12:21:27 +0200 |
| commit | fe0a129687c530d95377a6ed7c14d578c5be5996 (patch) | |
| tree | 64a9164f8a2a3dc5f23721a4443cb14b21ce4bff /zebra/zapi_msg.c | |
| parent | 2e2dc4f024312b7351b3d7e964fed42895fd123e (diff) | |
lib,zebra: link-params are not flushed after no enable
Daemons like isisd continue to use the previous link-params after they
are removed from zebra.
For example,
>r0# sh run zebra
> (...)
> interface eth-rt1
> link-params
> enable
> metric 100
> exit-link-params
> r0# conf
> r0(config)# interface eth-rt1
> r0(config-if)# link-params
> r0(config-link-params)# no enable
After "no enable", "sh run zebra" displays no more link-params context.
The "no enable" causes the release of the "link_params" pointer within
the "interface" structure. The zebra function to update daemons with
a ZEBRA_INTERFACE_LINK_PARAMS zapi message is called but the function
returns without doing anything because the "link_params" pointer is
NULL. Therefore, the "link_params" pointers are kept in daemons.
When the zebra "link_params" pointer is NULL:
- Send a zapi link param message that contains no link parameters
instead of sending no message.
- At reception in daemons, the absence of link parameters causes the
release of the "link_params" pointer.
Fixes: 16f1b9e ("Update Traffic Engineering Support for OSPFD")
Signed-off-by: Louis Scalbert <louis.scalbert@6wind.com>
Diffstat (limited to 'zebra/zapi_msg.c')
| -rw-r--r-- | zebra/zapi_msg.c | 5 |
1 files changed, 0 insertions, 5 deletions
diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 761ba789b8..4d7ad21bf3 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -232,11 +232,6 @@ int zsend_interface_link_params(struct zserv *client, struct interface *ifp) { struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ); - if (!ifp->link_params) { - stream_free(s); - return 0; - } - zclient_create_header(s, ZEBRA_INTERFACE_LINK_PARAMS, ifp->vrf->vrf_id); /* Add Interface Index */ |
