mirror of
https://git.proxmox.com/git/mirror_frr
synced 2025-08-06 00:06:09 +00:00
bgpd, zebra: Ensure that passed flags is 0 for unregister event
The flags passed in should be 0 for an unregister event. Ensure that we respect that. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
This commit is contained in:
parent
832d0f566f
commit
e0b84ba1f6
@ -154,7 +154,12 @@ void bgp_reg_dereg_for_label(struct bgp_node *rn, struct bgp_info *ri, int reg)
|
||||
|
||||
/* Set length and flags */
|
||||
stream_putw_at(s, 0, stream_get_endp(s));
|
||||
stream_putw_at(s, flags_pos, flags);
|
||||
|
||||
/*
|
||||
* We only need to write new flags if this is a register
|
||||
*/
|
||||
if (reg)
|
||||
stream_putw_at(s, flags_pos, flags);
|
||||
|
||||
zclient_send_message(zclient);
|
||||
}
|
||||
|
@ -907,6 +907,9 @@ static int zserv_fec_unregister(struct zserv *client, u_short length)
|
||||
|
||||
while (l < length) {
|
||||
STREAM_GETW(s, flags);
|
||||
if (flags != 0)
|
||||
goto stream_failure;
|
||||
|
||||
memset(&p, 0, sizeof(p));
|
||||
STREAM_GETW(s, p.family);
|
||||
if (p.family != AF_INET && p.family != AF_INET6) {
|
||||
|
Loading…
Reference in New Issue
Block a user