]> git.proxmox.com Git - mirror_frr.git/commitdiff
pimd: IN_MULTICAST needs host order
authorDonald Sharp <sharpd@nvidia.com>
Sun, 12 Mar 2023 00:37:21 +0000 (19:37 -0500)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Tue, 14 Mar 2023 05:49:02 +0000 (05:49 +0000)
New correct behavior:

eva# conf
eva(config)# ip pim rp 192.168.1.224 224.0.0.0/24
No Path to RP address specified: 192.168.1.224
eva(config)# ip pim rp 224.1.2.3 224.0.0.0/24
% Bad RP address specified: 224.1.2.3
eva(config)#

Fixes: #12970
Signed-off-by: Donald Sharp <sharpd@nvidia.com>
(cherry picked from commit 8083e713562a44744c4c2f4a0aa5cc6e2b2170ff)

pimd/pim_util.c

index 273c332c95c1f22efd442c40477761eb0f951c74..1528d228677cbe42e84c0265b884bd821de173ef 100644 (file)
@@ -172,7 +172,7 @@ int pim_get_all_mcast_group(struct prefix *prefix)
 bool pim_addr_is_multicast(pim_addr addr)
 {
 #if PIM_IPV == 4
-       if (IN_MULTICAST(addr.s_addr))
+       if (IN_MULTICAST(ntohl(addr.s_addr)))
                return true;
 #else
        if (IN6_IS_ADDR_MULTICAST(&addr))