summaryrefslogtreecommitdiffstats
path: root/pimd
diff options
context:
space:
mode:
authorSai Gomathi N <nsaigomathi@vmware.com>2023-03-02 14:55:17 +0100
committerSai Gomathi N <nsaigomathi@vmware.com>2023-03-17 06:13:26 +0100
commit63391673003155243025417fb62b0caf7720e7be (patch)
treea9b2a03c0ddc0ea97697e6cd85a5355c4ffb10cd /pimd
parentMerge pull request #12999 from opensourcerouting/fix/bgp_leaks_random_stuff (diff)
downloadfrr-63391673003155243025417fb62b0caf7720e7be.tar.xz
frr-63391673003155243025417fb62b0caf7720e7be.zip
pim6d: Custom error-message for non-multicast groups
While configuring global or non-multicast address for IPv6 mld join command, displaying a custom error-message "invalid multicast address" Signed-off-by: Sai Gomathi N <nsaigomathi@vmware.com>
Diffstat (limited to 'pimd')
-rw-r--r--pimd/pim6_cmd.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/pimd/pim6_cmd.c b/pimd/pim6_cmd.c
index eb29a57e2..9394e4c15 100644
--- a/pimd/pim6_cmd.c
+++ b/pimd/pim6_cmd.c
@@ -539,6 +539,14 @@ DEFPY (interface_ipv6_mld_join,
"Source address\n")
{
char xpath[XPATH_MAXLEN];
+ struct ipaddr group_addr = {0};
+
+ (void)str2ipaddr(group_str, &group_addr);
+
+ if (!IN6_IS_ADDR_MULTICAST(&group_addr)) {
+ vty_out(vty, "Invalid Multicast Address\n");
+ return CMD_WARNING_CONFIG_FAILED;
+ }
if (source_str) {
if (IPV6_ADDR_SAME(&source, &in6addr_any)) {