static void vrrp_prio_handler(vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); vrrp->base_priority = atoi(vector_slot(strvec, 1)); if (VRRP_IS_BAD_PRIORITY(vrrp->base_priority)) { log_message(LOG_INFO, "(%s): Priority not valid! must be between 1 & 255. Reconfigure !", vrrp->iname); log_message(LOG_INFO, "%*sUsing default value : %d", (int)strlen(vrrp->iname) + 4, "", VRRP_PRIO_DFL); vrrp->base_priority = VRRP_PRIO_DFL; } vrrp->effective_priority = vrrp->base_priority; }
static void vrrp_prio_handler(vector_t *strvec) { vrrp_t *vrrp = LIST_TAIL_DATA(vrrp_data->vrrp); vrrp->effective_priority = vrrp->base_priority = atoi(vector_slot(strvec, 1)); if (VRRP_IS_BAD_PRIORITY(vrrp->base_priority)) { log_message(LOG_INFO, "VRRP Error : Priority not valid !"); log_message(LOG_INFO, " must be between 1 & 255. reconfigure !"); log_message(LOG_INFO, " Using default value : %d\n", VRRP_PRIO_DFL); vrrp->effective_priority = vrrp->base_priority = VRRP_PRIO_DFL; } }