diff options
author | Sarita Patra <saritap@vmware.com> | 2022-09-23 09:08:23 +0200 |
---|---|---|
committer | Sarita Patra <saritap@vmware.com> | 2022-09-30 12:35:49 +0200 |
commit | 6ea2a7fb4fdf3c52c700d9447e0a34a6dd87b719 (patch) | |
tree | 7fcecc332eba929639cca061b61140f928cee4cd /pimd/pim_hello.c | |
parent | Merge pull request #11958 from AbhishekNR/ttable_show (diff) | |
download | frr-6ea2a7fb4fdf3c52c700d9447e0a34a6dd87b719.tar.xz frr-6ea2a7fb4fdf3c52c700d9447e0a34a6dd87b719.zip |
pimd, pim6d: send secondary address in PIM hello packet
Fixed as per rfc7761 section 4.3.1.
"""
Sending Hello Messages
The Address List option advertises all the secondary addresses
associated with the source interface of the router originating the
message. The option MUST be included in all Hello messages if there
are secondary addresses associated with the source interface and MAY
be omitted if no secondary addresses exist.
"""
Issue: #12015
Signed-off-by: Sarita Patra <saritap@vmware.com>
Diffstat (limited to 'pimd/pim_hello.c')
-rw-r--r-- | pimd/pim_hello.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/pimd/pim_hello.c b/pimd/pim_hello.c index 833103c27..03ce8687e 100644 --- a/pimd/pim_hello.c +++ b/pimd/pim_hello.c @@ -389,8 +389,10 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, uint8_t *curr = tlv_buf; uint8_t *pastend = tlv_buf + tlv_buf_size; uint8_t *tmp; +#if PIM_IPV == 4 struct pim_interface *pim_ifp = ifp->info; struct pim_instance *pim = pim_ifp->pim; +#endif /* * Append options @@ -452,19 +454,20 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, /* Secondary Address List */ if (ifp->connected->count) { - curr = pim_tlv_append_addrlist_ucast(curr, pastend, - ifp->connected, AF_INET); + curr = pim_tlv_append_addrlist_ucast(curr, pastend, ifp, + PIM_AF); if (!curr) { if (PIM_DEBUG_PIM_HELLO) { zlog_debug( - "%s: could not set PIM hello v4 Secondary Address List option for interface %s", - __func__, ifp->name); + "%s: could not set PIM hello %s Secondary Address List option for interface %s", + __func__, PIM_AF_NAME, ifp->name); } return -4; } +#if PIM_IPV == 4 if (pim->send_v6_secondary) { - curr = pim_tlv_append_addrlist_ucast( - curr, pastend, ifp->connected, AF_INET6); + curr = pim_tlv_append_addrlist_ucast(curr, pastend, ifp, + AF_INET6); if (!curr) { if (PIM_DEBUG_PIM_HELLO) { zlog_debug( @@ -474,6 +477,7 @@ int pim_hello_build_tlv(struct interface *ifp, uint8_t *tlv_buf, return -4; } } +#endif } return curr - tlv_buf; |