Merge pull request #12931 from SaiGomathiN/yang

pim6d: custom error-message for non-multicast groups
This commit is contained in:
Donatas Abraitis 2023-03-27 13:45:00 +03:00 committed by GitHub
commit 6bfb662245
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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)) {