diff options
-rw-r--r-- | pimd/pim_bsm.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/pimd/pim_bsm.c b/pimd/pim_bsm.c index ffaa858fa..9d42666b9 100644 --- a/pimd/pim_bsm.c +++ b/pimd/pim_bsm.c @@ -1033,7 +1033,8 @@ static uint32_t hash_calc_on_grp_rp(struct prefix group, struct in_addr rp, else grpaddr = grpaddr & mask; rp_add = ntohl(rp.s_addr); - temp = 1103515245 * ((1103515245 * grpaddr + 12345) ^ rp_add) + 12345; + temp = 1103515245 * ((1103515245 * (uint64_t)grpaddr + 12345) ^ rp_add) + + 12345; hash = temp & (0x7fffffff); return hash; } |