Skip to content

Commit

Permalink
pimd, pim6d: Don't configure link-local, Multicast, Unspecified addre…
Browse files Browse the repository at this point in the history
…ss as RP

Problem:
=======
frr(config)# do show ipv6 pim interface
 Interface  State  Address                   PIM Nbrs  PIM DR  FHR  IfChannels
 ens192     up     fe80::250:56ff:feb7:3619  0         local   0    1

Configure ens192 interface link-local address as RP.
frr(config)# ipv6 pim rp fe80::250:56ff:feb7:3619
No Path to RP address specified: fe80::250:56ff:feb7:3619

frr(config)# do show ipv6 pim rp-info
 RP address                group/prefix-list  OIF      I am RP  Source  Group-Type
 fe80::250:56ff:feb7:3619  ff00::/8           Unknown  yes      Static  ASM

Fix:
===
RP should not be link-local, multicast and unspecified address.

Signed-off-by: Sarita Patra <saritap@vmware.com>
  • Loading branch information
patrasar committed Oct 19, 2022
1 parent f351645 commit d05d49a
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions pimd/pim_cmd_common.c
Original file line number Diff line number Diff line change
Expand Up @@ -566,6 +566,20 @@ int pim_process_rp_cmd(struct vty *vty, const char *rp_str,
return CMD_WARNING_CONFIG_FAILED;
}

if ((pim_addr_is_any(rp_addr)) || (pim_addr_is_multicast(rp_addr)))
{
vty_out(vty, "%% Bad RP address specified: %s\n", rp_str);
return CMD_WARNING_CONFIG_FAILED;
}

#if PIM_IPV == 6
if (IN6_IS_ADDR_LINKLOCAL(&rp_addr))
{
vty_out(vty, "%% Bad RP address specified: %s\n", rp_str);
return CMD_WARNING_CONFIG_FAILED;
}
#endif

vrfname = pim_cli_get_vrf_name(vty);
if (vrfname == NULL)
return CMD_WARNING_CONFIG_FAILED;
Expand Down

0 comments on commit d05d49a

Please sign in to comment.