diff options
| author | Sarita Patra <saritap@vmware.com> | 2022-10-10 18:38:14 -0700 |
|---|---|---|
| committer | Mergify <37929162+mergify[bot]@users.noreply.github.com> | 2022-10-21 07:35:14 +0000 |
| commit | ce7f4cfd80295cc840e7735c86e3eaf0bc77ded5 (patch) | |
| tree | c4450bece00b367b67c95f4ce29795a4f196bc2b /pimd/pim_cmd_common.c | |
| parent | a66684d9e697dab6891c4276eb393e75a1973b8f (diff) | |
pimd, pim6d: Don't configure link-local, Multicast, Unspecified address 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>
(cherry picked from commit aae2af98ca62b17b2bd63e432d65938d7202b9bd)
Diffstat (limited to 'pimd/pim_cmd_common.c')
| -rw-r--r-- | pimd/pim_cmd_common.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/pimd/pim_cmd_common.c b/pimd/pim_cmd_common.c index 9283016d08..a647f92461 100644 --- a/pimd/pim_cmd_common.c +++ b/pimd/pim_cmd_common.c @@ -566,6 +566,18 @@ 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; |
