]> git.puffer.fish Git - mirror/frr.git/commitdiff
pimd: fix msdp mesh grp with wildcard member addr 9941/head
authorChirag Shah <chirag@nvidia.com>
Tue, 2 Nov 2021 17:58:47 +0000 (10:58 -0700)
committerChirag Shah <chirag@nvidia.com>
Mon, 8 Nov 2021 14:50:55 +0000 (06:50 -0800)
frr-reload fails to recognize wildcard "*" for
member address in frr.conf/runing-config as cli
syntax expects in v4 address format.

Ticket: #2816923

Testing:

Without fix:
running config:
ip msdp mesh-group foo1 member *
Frr reoad failure log:
2021-11-02 11:05:04,317  INFO: Loading Config object from vtysh show running
line 5: % Unknown command: ip msdp mesh-group foo1 member *

Traceback (most recent call last):
  File "/usr/lib/frr/frr-reload.py", line 1950, in <module>

With fix:
--------
running config displays:
ip msdp mesh-group foo1 member 0.0.0.0

Signed-off-by: Chirag Shah <chirag@nvidia.com>
pimd/pim_msdp.c

index ddba33ff9d53768dad316646be4f0b1cd31e50f0..fa7f1da79ad87d4b1b45c8fe0df4cf0c5eb70432 100644 (file)
@@ -1304,7 +1304,6 @@ int pim_msdp_config_write(struct pim_instance *pim, struct vty *vty,
        struct pim_msdp_mg *mg;
        struct listnode *mbrnode;
        struct pim_msdp_mg_mbr *mbr;
-       char mbr_str[INET_ADDRSTRLEN];
        char src_str[INET_ADDRSTRLEN];
        int count = 0;
 
@@ -1321,10 +1320,8 @@ int pim_msdp_config_write(struct pim_instance *pim, struct vty *vty,
                }
 
                for (ALL_LIST_ELEMENTS_RO(mg->mbr_list, mbrnode, mbr)) {
-                       pim_inet4_dump("<mbr?>", mbr->mbr_ip, mbr_str,
-                                      sizeof(mbr_str));
-                       vty_out(vty, "%sip msdp mesh-group %s member %s\n",
-                               spaces, mg->mesh_group_name, mbr_str);
+                       vty_out(vty, "%sip msdp mesh-group %s member %pI4\n",
+                               spaces, mg->mesh_group_name, &mbr->mbr_ip);
                        ++count;
                }
        }