diff options
| author | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-13 12:08:38 -0400 |
|---|---|---|
| committer | Quentin Young <qlyoung@cumulusnetworks.com> | 2018-03-13 12:08:38 -0400 |
| commit | 1f35b46a2f35d59b86ed3ee557aa1c9fcf2fcac9 (patch) | |
| tree | 27de606b3510b126766ac7a0ac9eb8ddf4573ab0 /pimd/pim_iface.c | |
| parent | d47ae3db4cf14c72d8468d61113ac88e19235791 (diff) | |
| parent | c1a003878246ccc84ab5986558ca959f4545f738 (diff) | |
Merge branch 'master' into docuser
Signed-off-by: Quentin Young <qlyoung@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_iface.c')
| -rw-r--r-- | pimd/pim_iface.c | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/pimd/pim_iface.c b/pimd/pim_iface.c index a807c69c60..ff7238ae97 100644 --- a/pimd/pim_iface.c +++ b/pimd/pim_iface.c @@ -427,8 +427,7 @@ static int pim_sec_addr_update(struct interface *ifp) struct pim_secondary_addr *sec_addr; int changed = 0; - for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, - sec_addr)) { + for (ALL_LIST_ELEMENTS_RO(pim_ifp->sec_addr_list, node, sec_addr)) { sec_addr->flags |= PIM_SEC_ADDRF_STALE; } @@ -575,7 +574,11 @@ void pim_if_addr_add(struct connected *ifc) /* if addr new, add IGMP socket */ if (ifc->address->family == AF_INET) pim_igmp_sock_add(pim_ifp->igmp_socket_list, - ifaddr, ifp); + ifaddr, ifp, false); + } else if (igmp->mtrace_only) { + igmp_sock_delete(igmp); + pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, + ifp, false); } /* Replay Static IGMP groups */ @@ -612,6 +615,20 @@ void pim_if_addr_add(struct connected *ifc) } } } /* igmp */ + else { + struct igmp_sock *igmp; + + /* lookup IGMP socket */ + igmp = pim_igmp_sock_lookup_ifaddr(pim_ifp->igmp_socket_list, + ifaddr); + if (ifc->address->family == AF_INET) { + if (igmp) + igmp_sock_delete(igmp); + /* if addr new, add IGMP socket */ + pim_igmp_sock_add(pim_ifp->igmp_socket_list, ifaddr, + ifp, true); + } + } /* igmp mtrace only */ if (PIM_IF_TEST_PIM(pim_ifp->options)) { @@ -1286,7 +1303,7 @@ static struct igmp_join *igmp_join_new(struct interface *ifp, } ferr_r pim_if_igmp_join_add(struct interface *ifp, struct in_addr group_addr, - struct in_addr source_addr) + struct in_addr source_addr) { struct pim_interface *pim_ifp; struct igmp_join *ij; |
