Merge pull request #6072 from sarav511/bsrelect

pimd: bsr election elects wrong bsr
This commit is contained in:
Donald Sharp 2020-03-24 06:29:04 -04:00 committed by GitHub
commit 5b299acd1f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -601,7 +601,8 @@ static bool is_preferred_bsr(struct pim_instance *pim, struct in_addr bsr,
return true;
else if (bsr_prio == pim->global_scope.current_bsr_prio) {
if (bsr.s_addr >= pim->global_scope.current_bsr.s_addr)
if (ntohl(bsr.s_addr)
>= ntohl(pim->global_scope.current_bsr.s_addr))
return true;
else
return false;