diff options
| author | vivek <vivek@cumulusnetworks.com> | 2015-11-20 08:51:48 -0800 |
|---|---|---|
| committer | vivek <vivek@cumulusnetworks.com> | 2015-11-20 08:51:48 -0800 |
| commit | 922705ecdccad98dcb5eb8dcb37394ec339afe51 (patch) | |
| tree | b2db1f62de86768be5edc4658bff5f345282cc89 /zebra/connected.c | |
| parent | 41ec92223a7dfc14eb8cb0b84c73ad09943213eb (diff) | |
| parent | 8afc891ac75f2b1f17d9190ef8de5378ec55fcd5 (diff) | |
Merge branch 'cmaster' of ssh://stash.cumulusnetworks.com:7999/quag/quagga into cmaster
Diffstat (limited to 'zebra/connected.c')
| -rw-r--r-- | zebra/connected.c | 50 |
1 files changed, 2 insertions, 48 deletions
diff --git a/zebra/connected.c b/zebra/connected.c index 98e0bb84af..41b68d1564 100644 --- a/zebra/connected.c +++ b/zebra/connected.c @@ -79,20 +79,12 @@ connected_announce (struct interface *ifp, struct connected *ifc) if (!ifc) return; - if (ifc->address->family == AF_INET) + if (!if_is_loopback(ifp) && ifc->address->family == AF_INET) { - if ((ifc->anchor = if_anchor_lookup_by_address(ifc->address->u.prefix4))) - { - /* found an anchor, so I'm unnumbered */ + if (ifc->address->prefixlen == 32) SET_FLAG (ifc->flags, ZEBRA_IFA_UNNUMBERED); - listnode_add (ifc->anchor->unnumbered, ifc); - } else - { - /* I'm numbered */ UNSET_FLAG (ifc->flags, ZEBRA_IFA_UNNUMBERED); - ifc->unnumbered = list_new(); - } } listnode_add (ifp->connected, ifc); @@ -339,42 +331,6 @@ connected_down_ipv4 (struct interface *ifp, struct connected *ifc) rib_update_static (ifp->vrf_id); } -void -connected_delete_ipv4_unnumbered (struct connected *ifc) -{ - struct connected *new_anchor, *iter; - struct listnode *node; - - if (CHECK_FLAG (ifc->flags, ZEBRA_IFA_UNNUMBERED)) - { - listnode_delete (ifc->anchor->unnumbered, ifc); - ifc->anchor = NULL; - } - else /* I'm a numbered interface */ - { - if (!list_isempty (ifc->unnumbered)) - { - new_anchor = listgetdata (listhead (ifc->unnumbered)); - new_anchor->unnumbered = ifc->unnumbered; - listnode_delete (new_anchor->unnumbered, new_anchor); - new_anchor->anchor = NULL; - - /* new_anchor changed from unnumbered to numbered, notify clients */ - zebra_interface_address_delete_update (new_anchor->ifp, new_anchor); - UNSET_FLAG (new_anchor->flags, ZEBRA_IFA_UNNUMBERED); - zebra_interface_address_add_update (new_anchor->ifp, new_anchor); - - for (ALL_LIST_ELEMENTS_RO(new_anchor->unnumbered, node, iter)) - iter->anchor = new_anchor; - } - else - { - list_free (ifc->unnumbered); - ifc->unnumbered = NULL; - } - } -} - /* Delete connected IPv4 route to the interface. */ void connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, @@ -392,8 +348,6 @@ connected_delete_ipv4 (struct interface *ifp, int flags, struct in_addr *addr, if (! ifc) return; - connected_delete_ipv4_unnumbered (ifc); - connected_withdraw (ifc); if (IS_ZEBRA_DEBUG_RIB_DETAILED) |
