Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug about sending bootstrap when configured of c-rp & c-bsr at same router #15

Closed
zrs0923 opened this issue Jun 11, 2012 · 2 comments
Closed

Comments

@zrs0923
Copy link

zrs0923 commented Jun 11, 2012

pim_proto.c L--3169:

int send_pim_cand_rp_adv(void)
{
u_int8 prefix_cnt;
u_int32 grp_mask;
pim_encod_grp_addr_t encod_grp_addr;
u_int8 *data_ptr;

if (!inet_valid_host(curr_bsr_address))
    return FALSE;  /* No BSR yet */

if (curr_bsr_address == my_bsr_address) {
    /* I am the BSR and have to include my own group_prefix stuff */
    prefix_cnt = *cand_rp_adv_message.prefix_cnt_ptr;
    if (prefix_cnt == 0) {
        /* The default 224.0.0.0 and masklen of 4 */
        MASKLEN_TO_MASK(ALL_MCAST_GROUPS_LENGTH, grp_mask);
        add_rp_grp_entry(&cand_rp_list, &grp_mask_list,
                         my_cand_rp_address, my_cand_rp_priority,
                         my_cand_rp_holdtime,
                         htonl(ALL_MCAST_GROUPS_ADDR),
                         my_bsr_hash_mask,
                         grp_mask, curr_bsr_fragment_tag);
        return TRUE;
    }

look carefully at the 7th and 8th arguments of function add_rp_grp_entry, seems they are at each others' place, otherwise the bootstrap message would have the group address of "0.0.0.0":
---------->add_rp_grp_entry(&cand_rp_list, &grp_mask_list,
my_cand_rp_address, my_cand_rp_priority,
my_cand_rp_holdtime,
htonl(ALL_MCAST_GROUPS_ADDR),
grp_mask,
my_bsr_hash_mask, curr_bsr_fragment_tag);

@troglobit
Copy link
Owner

Thanks for the heads up!

In the future it is preferable if you could attach a patch for the proposed fix, or a pull request.

troglobit added a commit that referenced this issue Jun 12, 2012
@troglobit
Copy link
Owner

Fixed in c4b1c9f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants