summaryrefslogtreecommitdiff
path: root/pimd/pim_zebra.c
diff options
context:
space:
mode:
authorDonald Sharp <sharpd@cumulusnetworks.com>2017-03-30 09:10:05 -0400
committerDonald Sharp <sharpd@cumulusnetworks.com>2017-03-30 09:34:03 -0400
commit294b6d7243983270d69c85aaa8528c78a2521da5 (patch)
tree6c9c9d41c078e58eb8bc0d001aa61c82194bc012 /pimd/pim_zebra.c
parenteeff6d3f99c8965bbb4870d9ca0f8da5f6a53e57 (diff)
pimd: Receive incoming v6 addresses and place in pim_ifp list
Add code to properly receive v6 addresses up from zebra and to properly place them into our interface secondary address list. Additionally cleanup some code in pim_cmd.c that was broken by these changes. Signed-off-by: Donald Sharp <sharpd@cumulusnetworks.com>
Diffstat (limited to 'pimd/pim_zebra.c')
-rw-r--r--pimd/pim_zebra.c22
1 files changed, 1 insertions, 21 deletions
diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c
index d02560bfc2..bbee95bddd 100644
--- a/pimd/pim_zebra.c
+++ b/pimd/pim_zebra.c
@@ -257,31 +257,11 @@ static int pim_zebra_if_address_add(int command, struct zclient *zclient,
#endif
}
- if (p->family != AF_INET)
- {
- struct listnode *cnode;
- struct connected *conn;
- int v4addrs = 0;
-
- for (ALL_LIST_ELEMENTS_RO (c->ifp->connected, cnode, conn))
- {
- if (conn->address->family == AF_INET)
- v4addrs++;
- }
- if (!v4addrs && pim_ifp)
- {
- pim_ifp->primary_address = pim_find_primary_addr (c->ifp);
- pim_if_addr_add_all (c->ifp);
- pim_if_add_vif (c->ifp);
- }
- return 0;
- }
-
if (!CHECK_FLAG(c->flags, ZEBRA_IFA_SECONDARY)) {
/* trying to add primary address */
struct in_addr primary_addr = pim_find_primary_addr(c->ifp);
- if (primary_addr.s_addr != p->u.prefix4.s_addr) {
+ if (p->family != AF_INET || primary_addr.s_addr != p->u.prefix4.s_addr) {
if (PIM_DEBUG_ZEBRA) {
/* but we had a primary address already */