vrrp_ctrl.c: Fix bad cleaning of ctrl buffers
This commit is contained in:
parent
549cc03712
commit
9f3e6f8659
13
vrrp_ctrl.c
13
vrrp_ctrl.c
|
@ -143,7 +143,6 @@ static inline vrrp_event_t vrrp_ctrl_cmd(struct vrrp *vrrp,
|
||||||
if (nword == 0)
|
if (nword == 0)
|
||||||
return INVALID;
|
return INVALID;
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* control cmd stop
|
* control cmd stop
|
||||||
*/
|
*/
|
||||||
|
@ -172,6 +171,7 @@ static inline vrrp_event_t vrrp_ctrl_cmd(struct vrrp *vrrp,
|
||||||
|
|
||||||
set_bit(UVRRPD_DUMP, ®);
|
set_bit(UVRRPD_DUMP, ®);
|
||||||
vrrp_ctrl_cmd_flush(&vrrp->ctrl);
|
vrrp_ctrl_cmd_flush(&vrrp->ctrl);
|
||||||
|
return CTRL_FIFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@ -182,6 +182,8 @@ static inline vrrp_event_t vrrp_ctrl_cmd(struct vrrp *vrrp,
|
||||||
log_error
|
log_error
|
||||||
("vrid %d :: invalid syntax, control cmd prio <priority>",
|
("vrid %d :: invalid syntax, control cmd prio <priority>",
|
||||||
vrrp->vrid);
|
vrrp->vrid);
|
||||||
|
|
||||||
|
vrrp_ctrl_cmd_flush(&vrrp->ctrl);
|
||||||
return INVALID;
|
return INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -206,10 +208,11 @@ static inline vrrp_event_t vrrp_ctrl_cmd(struct vrrp *vrrp,
|
||||||
return INVALID;
|
return INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
vrrp->priority = (uint8_t) opt;
|
|
||||||
|
|
||||||
/* change prio */
|
/* change prio */
|
||||||
vrrp_adv_set_priority(vnet, vrrp->priority);
|
if (vrrp->priority != (uint8_t) opt) {
|
||||||
|
vrrp->priority = (uint8_t) opt;
|
||||||
|
vrrp_adv_set_priority(vnet, vrrp->priority);
|
||||||
|
}
|
||||||
|
|
||||||
/* reload bit */
|
/* reload bit */
|
||||||
set_bit(UVRRPD_RELOAD, ®);
|
set_bit(UVRRPD_RELOAD, ®);
|
||||||
|
@ -217,6 +220,8 @@ static inline vrrp_event_t vrrp_ctrl_cmd(struct vrrp *vrrp,
|
||||||
return CTRL_FIFO;
|
return CTRL_FIFO;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
vrrp_ctrl_cmd_flush(&vrrp->ctrl);
|
||||||
|
|
||||||
return INVALID;
|
return INVALID;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue