diff options
author | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-11-07 21:40:08 +0100 |
---|---|---|
committer | Donald Sharp <sharpd@cumulusnetworks.com> | 2016-12-22 02:26:14 +0100 |
commit | bce0e645214306808047f3ffd321abaa844c3e97 (patch) | |
tree | 1bfdbed0e6a583f146c80345f624552f4534750c /pimd/pim_tlv.c | |
parent | pimd: Add ability for ifchannel *,G to know their S,G's (diff) | |
download | frr-bce0e645214306808047f3ffd321abaa844c3e97.tar.xz frr-bce0e645214306808047f3ffd321abaa844c3e97.zip |
pimd: Modify pim_parse_addr_group to use 'struct prefix_sg'
Modify the pim_parse_addr_group to use 'struct prefix_sg sg'.
This is the first of 2 commits to clean up this parsing to
be a bit better.
Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_tlv.c')
-rw-r--r-- | pimd/pim_tlv.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/pimd/pim_tlv.c b/pimd/pim_tlv.c index d083cd8f4..3d48c05af 100644 --- a/pimd/pim_tlv.c +++ b/pimd/pim_tlv.c @@ -509,7 +509,7 @@ pim_parse_addr_ucast (struct prefix *p, } int -pim_parse_addr_group (struct prefix *p, +pim_parse_addr_group (struct prefix_sg *sg, const uint8_t *buf, int buf_size) { @@ -551,17 +551,15 @@ pim_parse_addr_group (struct prefix *p, return -3; } - p->family = AF_INET; /* notice: AF_INET != PIM_MSG_ADDRESS_FAMILY_IPV4 */ - memcpy(&p->u.prefix4, addr, sizeof(struct in_addr)); - p->prefixlen = mask_len; + memcpy(&sg->grp.s_addr, addr, sizeof(struct in_addr)); addr += sizeof(struct in_addr); break; default: { - zlog_warn("%s: unknown group address encoding family=%d from", - __PRETTY_FUNCTION__, family); + zlog_warn("%s: unknown group address encoding family=%d mask_len=%d from", + __PRETTY_FUNCTION__, family, mask_len); return -4; } } |