diff options
| author | Sarita Patra <saritap@vmware.com> | 2019-02-08 01:35:21 -0800 |
|---|---|---|
| committer | Sarita Patra <saritap@vmware.com> | 2019-02-08 01:35:21 -0800 |
| commit | 6b44b401410a7f910af560d99822c65d71e8fbad (patch) | |
| tree | 698b796e329e9d585d42b5932287b964ecb0e6ce /pimd/pim_cmd.c | |
| parent | aef69c4feab965298bdb176c0fcebddb533a4066 (diff) | |
pimd: reject inconsistent address/mask "ip pim rp command"
Issue: Configure "ip pim rp x.x.x.x 225.0.0.0/4".
Show running config shows "ip pim rp x.x.x.x 224.0.0.0/4"
This is mis-leading.
Root-cause: Internally 225.0.0.0/4 is getting converted to
224.0.0.0/4 group mask, since the prefix length is 4.
Fix: Restrict the user to configure inconsistent group address
mask by throughing a cli error "Inconsistent address and mask".
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_cmd.c')
| -rw-r--r-- | pimd/pim_cmd.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/pimd/pim_cmd.c b/pimd/pim_cmd.c index 2c19d061a8..d2d2445a15 100644 --- a/pimd/pim_cmd.c +++ b/pimd/pim_cmd.c @@ -5142,6 +5142,12 @@ static int pim_rp_cmd_worker(struct pim_instance *pim, struct vty *vty, return CMD_WARNING_CONFIG_FAILED; } + if (result == PIM_GROUP_BAD_ADDR_MASK_COMBO) { + vty_out(vty, "%% Inconsistent address and mask: %s\n", + group); + return CMD_WARNING_CONFIG_FAILED; + } + return CMD_SUCCESS; } |
