]> git.puffer.fish Git - matthieu/frr.git/commitdiff
pimd: Register stop message sent with mask 32
authorSarita Patra <saritap@vmware.com>
Wed, 29 Jun 2022 13:34:19 +0000 (06:34 -0700)
committerMergify <37929162+mergify[bot]@users.noreply.github.com>
Wed, 29 Jun 2022 17:03:14 +0000 (17:03 +0000)
As per RFC 4601 section 4.9.4, For Register-Stops,
the Mask Len field contains full address length * 8
(e.g. 32 for IPv4 native encoding) (e.g. 128 for IPv6),
if the message is sent for a single group

The issue is seen after 10356, so fixed now.

Signed-off-by: Sarita Patra <saritap@vmware.com>
(cherry picked from commit 8e51ca271eebd9bec96dbe753e261e4953ae4b33)

pimd/pim_tlv.c

index 90bf7990931883a8f63863861d4a5c57026cf35b..65975ce14640bca825fc723a93374315ac92c497 100644 (file)
@@ -218,7 +218,7 @@ int pim_encode_addr_group(uint8_t *buf, afi_t afi, int bidir, int scope,
        *buf++ = PIM_MSG_ADDRESS_FAMILY;
        *buf++ = 0;
        *buf++ = flags;
-       *buf++ = sizeof(group) / 8;
+       *buf++ = sizeof(group) * 8;
        memcpy(buf, &group, sizeof(group));
        buf += sizeof(group);