summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pimd/pim_bsm.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c
index bcf11aedb..8b868250b 100644
--- a/pimd/pim_bsm.c
+++ b/pimd/pim_bsm.c
@@ -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;