Skip to content

Commit

Permalink
Merge pull request #756 from pqarmitage/fixes
Browse files Browse the repository at this point in the history
Improve the log message when a master receives higher priority advert
  • Loading branch information
pqarmitage committed Jan 18, 2018
2 parents 8c60bb1 + 531f2e7 commit 497f173
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions keepalived/vrrp/vrrp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1727,8 +1727,12 @@ vrrp_state_master_rx(vrrp_t * vrrp, char *buf, ssize_t buflen)
(hd->priority == vrrp->effective_priority &&
addr_cmp > 0)) {

log_message(LOG_INFO, "VRRP_Instance(%s) Received advert with higher priority %d, ours %d"
, vrrp->iname, hd->priority, vrrp->effective_priority);
if (hd->priority > vrrp->effective_priority)
log_message(LOG_INFO, "VRRP_Instance(%s) Master received advert with higher priority %d, ours %d"
, vrrp->iname, hd->priority, vrrp->effective_priority);
else
log_message(LOG_INFO, "VRRP_Instance(%s) Master received advert with same priority %d but higher IP address than ours (%s)"
, vrrp->iname, hd->priority, inet_sockaddrtos(&vrrp->pkt_saddr));
#ifdef _WITH_VRRP_AUTH_
if (proto == IPPROTO_IPSEC_AH) {
ah = (ipsec_ah_t *) (buf + sizeof(struct iphdr));
Expand Down

0 comments on commit 497f173

Please sign in to comment.