mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 21:50:39 +00:00
pbrd: add return val for pbr_send_pbr_map()
Add a return val so caller can know if something was actually sent to zebra here. Some things need to be cleanued up by the caller if we arent getting a callback from zapi. Signed-off-by: Stephen Worley <sworley@cumulusnetworks.com>
This commit is contained in:
parent
e2dcd0c2c5
commit
f08966a58d
@ -549,7 +549,7 @@ static void pbr_encode_pbr_map_sequence(struct stream *s,
|
|||||||
stream_put(s, ifp->name, INTERFACE_NAMSIZ);
|
stream_put(s, ifp->name, INTERFACE_NAMSIZ);
|
||||||
}
|
}
|
||||||
|
|
||||||
void pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
int pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
||||||
struct pbr_map_interface *pmi, bool install, bool changed)
|
struct pbr_map_interface *pmi, bool install, bool changed)
|
||||||
{
|
{
|
||||||
struct pbr_map *pbrm = pbrms->parent;
|
struct pbr_map *pbrm = pbrms->parent;
|
||||||
@ -569,10 +569,10 @@ void pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
|||||||
* to delete just return.
|
* to delete just return.
|
||||||
*/
|
*/
|
||||||
if (install && is_installed && !changed)
|
if (install && is_installed && !changed)
|
||||||
return;
|
return 1;
|
||||||
|
|
||||||
if (!install && !is_installed)
|
if (!install && !is_installed)
|
||||||
return;
|
return 1;
|
||||||
|
|
||||||
s = zclient->obuf;
|
s = zclient->obuf;
|
||||||
stream_reset(s);
|
stream_reset(s);
|
||||||
@ -595,4 +595,6 @@ void pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
|||||||
stream_putw_at(s, 0, stream_get_endp(s));
|
stream_putw_at(s, 0, stream_get_endp(s));
|
||||||
|
|
||||||
zclient_send_message(zclient);
|
zclient_send_message(zclient);
|
||||||
|
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -35,7 +35,7 @@ extern void route_delete(struct pbr_nexthop_group_cache *pnhgc,
|
|||||||
|
|
||||||
extern void pbr_send_rnh(struct nexthop *nhop, bool reg);
|
extern void pbr_send_rnh(struct nexthop *nhop, bool reg);
|
||||||
|
|
||||||
extern void pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
extern int pbr_send_pbr_map(struct pbr_map_sequence *pbrms,
|
||||||
struct pbr_map_interface *pmi, bool install,
|
struct pbr_map_interface *pmi, bool install,
|
||||||
bool changed);
|
bool changed);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user