diff options
author | Rafael Zalamena <rzalamena@users.noreply.github.com> | 2023-10-08 15:52:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-10-08 15:52:54 +0200 |
commit | 4a600456886e68e507eb12af1cc70bef0bdc70f4 (patch) | |
tree | 4ad7aee3137c243afd2693aa6fa0cdb58bd5138d | |
parent | Merge pull request #14541 from idryzhov/isis-fix-cb-destroy (diff) | |
parent | doc: replace commands list with header file (diff) | |
download | frr-4a600456886e68e507eb12af1cc70bef0bdc70f4.tar.xz frr-4a600456886e68e507eb12af1cc70bef0bdc70f4.zip |
Merge pull request #10733 from anlancs/zebra-remove-update
zebra: remove ZEBRA_INTERFACE_VRF_UPDATE
-rw-r--r-- | bfdd/ptm_adapter.c | 17 | ||||
-rw-r--r-- | bgpd/bgp_zebra.c | 61 | ||||
-rw-r--r-- | doc/developer/zebra.rst | 292 | ||||
-rw-r--r-- | lib/log.c | 1 | ||||
-rw-r--r-- | lib/zclient.h | 1 | ||||
-rw-r--r-- | ospfd/ospf_zebra.c | 24 | ||||
-rw-r--r-- | pbrd/pbr_zebra.c | 24 | ||||
-rw-r--r-- | pimd/pim_zebra.c | 34 | ||||
-rw-r--r-- | ripd/rip_interface.c | 25 | ||||
-rw-r--r-- | ripd/rip_zebra.c | 1 | ||||
-rw-r--r-- | ripngd/ripng_interface.c | 25 | ||||
-rw-r--r-- | ripngd/ripng_zebra.c | 1 | ||||
-rw-r--r-- | ripngd/ripngd.h | 1 | ||||
-rw-r--r-- | zebra/interface.c | 2 | ||||
-rw-r--r-- | zebra/redistribute.c | 11 | ||||
-rw-r--r-- | zebra/zapi_msg.c | 21 | ||||
-rw-r--r-- | zebra/zapi_msg.h | 2 |
17 files changed, 6 insertions, 537 deletions
diff --git a/bfdd/ptm_adapter.c b/bfdd/ptm_adapter.c index 490bc30d7..9e7ed114e 100644 --- a/bfdd/ptm_adapter.c +++ b/bfdd/ptm_adapter.c @@ -756,20 +756,6 @@ static int bfd_ifp_destroy(struct interface *ifp) return 0; } -static int bfdd_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t nvrfid; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, &nvrfid); - if (ifp == NULL) - return 0; - - if_update_to_new_vrf(ifp, nvrfid); - - return 0; -} - static void bfdd_sessions_enable_address(struct connected *ifc) { struct bfd_session_observer *bso; @@ -833,9 +819,6 @@ static zclient_handler *const bfd_handlers[] = { */ [ZEBRA_BFD_DEST_REPLAY] = bfdd_replay, - /* Learn about interface VRF. */ - [ZEBRA_INTERFACE_VRF_UPDATE] = bfdd_interface_vrf_update, - /* Learn about new addresses being registered. */ [ZEBRA_INTERFACE_ADDRESS_ADD] = bfdd_interface_address_update, [ZEBRA_INTERFACE_ADDRESS_DELETE] = bfdd_interface_address_update, diff --git a/bgpd/bgp_zebra.c b/bgpd/bgp_zebra.c index 741542f9b..a04d54fa9 100644 --- a/bgpd/bgp_zebra.c +++ b/bgpd/bgp_zebra.c @@ -477,66 +477,6 @@ static int bgp_interface_nbr_address_delete(ZAPI_CALLBACK_ARGS) return 0; } -/* VRF update for an interface. */ -static int bgp_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t new_vrf_id; - struct connected *c; - struct nbr_connected *nc; - struct listnode *node, *nnode; - struct bgp *bgp; - struct peer *peer; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - if (!ifp) - return 0; - - if (BGP_DEBUG(zebra, ZEBRA)) - zlog_debug("Rx Intf VRF change VRF %u IF %s NewVRF %u", vrf_id, - ifp->name, new_vrf_id); - - bgp = bgp_lookup_by_vrf_id(vrf_id); - - if (bgp) { - for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, c)) - bgp_connected_delete(bgp, c); - - for (ALL_LIST_ELEMENTS(ifp->nbr_connected, node, nnode, nc)) - bgp_nbr_connected_delete(bgp, nc, 1); - - /* Fast external-failover */ - if (!CHECK_FLAG(bgp->flags, BGP_FLAG_NO_FAST_EXT_FAILOVER)) { - for (ALL_LIST_ELEMENTS(bgp->peer, node, nnode, peer)) { - if ((peer->ttl != BGP_DEFAULT_TTL) - && (peer->gtsm_hops - != BGP_GTSM_HOPS_CONNECTED)) - continue; - - if (ifp == peer->nexthop.ifp) - BGP_EVENT_ADD(peer->connection, - BGP_Stop); - } - } - } - - if_update_to_new_vrf(ifp, new_vrf_id); - - bgp = bgp_lookup_by_vrf_id(new_vrf_id); - if (!bgp) - return 0; - - for (ALL_LIST_ELEMENTS(ifp->connected, node, nnode, c)) - bgp_connected_add(bgp, c); - - for (ALL_LIST_ELEMENTS(ifp->nbr_connected, node, nnode, nc)) - bgp_nbr_connected_add(bgp, nc); - - hook_call(bgp_vrf_status_changed, bgp, ifp); - return 0; -} - /* Zebra route add and delete treatment. */ static int zebra_read_route(ZAPI_CALLBACK_ARGS) { @@ -3401,7 +3341,6 @@ static zclient_handler *const bgp_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_DELETE] = bgp_interface_address_delete, [ZEBRA_INTERFACE_NBR_ADDRESS_ADD] = bgp_interface_nbr_address_add, [ZEBRA_INTERFACE_NBR_ADDRESS_DELETE] = bgp_interface_nbr_address_delete, - [ZEBRA_INTERFACE_VRF_UPDATE] = bgp_interface_vrf_update, [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = zebra_read_route, [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = zebra_read_route, [ZEBRA_NEXTHOP_UPDATE] = bgp_read_nexthop_update, diff --git a/doc/developer/zebra.rst b/doc/developer/zebra.rst index e5f4e07c6..be2952e71 100644 --- a/doc/developer/zebra.rst +++ b/doc/developer/zebra.rst @@ -159,297 +159,7 @@ Past Versions Zebra Protocol Commands ----------------------- -+-----------------------------------------+-------+ -| Command | Value | -+=========================================+=======+ -| ZEBRA_INTERFACE_ADD | 0 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_DELETE | 1 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_ADDRESS_ADD | 2 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_ADDRESS_DELETE | 3 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_UP | 4 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_DOWN | 5 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_SET_MASTER | 6 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_SET_PROTODOWN | 7 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTE_ADD | 8 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTE_DELETE | 9 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTE_NOTIFY_OWNER | 10 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_ADD | 11 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_DELETE | 12 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_DEFAULT_ADD | 13 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_DEFAULT_DELETE | 14 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTER_ID_ADD | 15 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTER_ID_DELETE | 16 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTER_ID_UPDATE | 17 | -+-----------------------------------------+-------+ -| ZEBRA_HELLO | 18 | -+-----------------------------------------+-------+ -| ZEBRA_CAPABILITIES | 19 | -+-----------------------------------------+-------+ -| ZEBRA_NEXTHOP_REGISTER | 20 | -+-----------------------------------------+-------+ -| ZEBRA_NEXTHOP_UNREGISTER | 21 | -+-----------------------------------------+-------+ -| ZEBRA_NEXTHOP_UPDATE | 22 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_NBR_ADDRESS_ADD | 23 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_NBR_ADDRESS_DELETE | 24 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_BFD_DEST_UPDATE | 25 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_DEST_REGISTER | 26 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_DEST_DEREGISTER | 27 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_DEST_UPDATE | 28 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_DEST_REPLAY | 29 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_ROUTE_ADD | 30 | -+-----------------------------------------+-------+ -| ZEBRA_REDISTRIBUTE_ROUTE_DEL | 31 | -+-----------------------------------------+-------+ -| ZEBRA_VRF_UNREGISTER | 32 | -+-----------------------------------------+-------+ -| ZEBRA_VRF_ADD | 33 | -+-----------------------------------------+-------+ -| ZEBRA_VRF_DELETE | 34 | -+-----------------------------------------+-------+ -| ZEBRA_VRF_LABEL | 35 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_VRF_UPDATE | 36 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_CLIENT_REGISTER | 37 | -+-----------------------------------------+-------+ -| ZEBRA_BFD_CLIENT_DEREGISTER | 38 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_ENABLE_RADV | 39 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_DISABLE_RADV | 40 | -+-----------------------------------------+-------+ -| ZEBRA_NEXTHOP_LOOKUP_MRIB | 41 | -+-----------------------------------------+-------+ -| ZEBRA_INTERFACE_LINK_PARAMS | 42 | -+-----------------------------------------+-------+ -| ZEBRA_MPLS_LABELS_ADD | 43 | -+-----------------------------------------+-------+ -| ZEBRA_MPLS_LABELS_DELETE | 44 | -+-----------------------------------------+-------+ -| ZEBRA_MPLS_LABELS_REPLACE | 45 | -+-----------------------------------------+-------+ -| ZEBRA_SR_POLICY_SET | 46 | -+-----------------------------------------+-------+ -| ZEBRA_SR_POLICY_DELETE | 47 | -+-----------------------------------------+-------+ -| ZEBRA_SR_POLICY_NOTIFY_STATUS | 48 | -+-----------------------------------------+-------+ -| ZEBRA_IPMR_ROUTE_STATS | 49 | -+-----------------------------------------+-------+ -| ZEBRA_LABEL_MANAGER_CONNECT | 50 | -+-----------------------------------------+-------+ -| ZEBRA_LABEL_MANAGER_CONNECT_ASYNC | 51 | -+-----------------------------------------+-------+ -| ZEBRA_GET_LABEL_CHUNK | 52 | -+-----------------------------------------+-------+ -| ZEBRA_RELEASE_LABEL_CHUNK | 53 | -+-----------------------------------------+-------+ -| ZEBRA_FEC_REGISTER | 54 | -+-----------------------------------------+-------+ -| ZEBRA_FEC_UNREGISTER | 55 | -+-----------------------------------------+-------+ -| ZEBRA_FEC_UPDATE | 56 | -+-----------------------------------------+-------+ -| ZEBRA_ADVERTISE_DEFAULT_GW | 57 | -+-----------------------------------------+-------+ -| ZEBRA_ADVERTISE_SVI_MACIP | 58 | -+-----------------------------------------+-------+ -| ZEBRA_ADVERTISE_SUBNET | 59 | -+-----------------------------------------+-------+ -| ZEBRA_ADVERTISE_ALL_VNI | 60 | -+-----------------------------------------+-------+ -| ZEBRA_LOCAL_ES_ADD | 61 | -+-----------------------------------------+-------+ -| ZEBRA_LOCAL_ES_DEL | 62 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_ES_VTEP_ADD | 63 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_ES_VTEP_DEL | 64 | -+-----------------------------------------+-------+ -| ZEBRA_LOCAL_ES_EVI_ADD | 65 | -+-----------------------------------------+-------+ -| ZEBRA_LOCAL_ES_EVI_DEL | 66 | -+-----------------------------------------+-------+ -| ZEBRA_VNI_ADD | 67 | -+-----------------------------------------+-------+ -| ZEBRA_VNI_DEL | 68 | -+-----------------------------------------+-------+ -| ZEBRA_L3VNI_ADD | 69 | -+-----------------------------------------+-------+ -| ZEBRA_L3VNI_DEL | 70 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_VTEP_ADD | 71 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_VTEP_DEL | 72 | -+-----------------------------------------+-------+ -| ZEBRA_MACIP_ADD | 73 | -+-----------------------------------------+-------+ -| ZEBRA_MACIP_DEL | 74 | -+-----------------------------------------+-------+ -| ZEBRA_IP_PREFIX_ROUTE_ADD | 75 | -+-----------------------------------------+-------+ -| ZEBRA_IP_PREFIX_ROUTE_DEL | 76 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_MACIP_ADD | 77 | -+-----------------------------------------+-------+ -| ZEBRA_REMOTE_MACIP_DEL | 78 | -+-----------------------------------------+-------+ -| ZEBRA_DUPLICATE_ADDR_DETECTION | 79 | -+-----------------------------------------+-------+ -| ZEBRA_PW_ADD | 80 | -+-----------------------------------------+-------+ -| ZEBRA_PW_DELETE | 81 | -+-----------------------------------------+-------+ -| ZEBRA_PW_SET | 82 | -+-----------------------------------------+-------+ -| ZEBRA_PW_UNSET | 83 | -+-----------------------------------------+-------+ -| ZEBRA_PW_STATUS_UPDATE | 84 | -+-----------------------------------------+-------+ -| ZEBRA_RULE_ADD | 85 | -+-----------------------------------------+-------+ -| ZEBRA_RULE_DELETE | 86 | -+-----------------------------------------+-------+ -| ZEBRA_RULE_NOTIFY_OWNER | 87 | -+-----------------------------------------+-------+ -| ZEBRA_TABLE_MANAGER_CONNECT | 88 | -+-----------------------------------------+-------+ -| ZEBRA_GET_TABLE_CHUNK | 89 | -+-----------------------------------------+-------+ -| ZEBRA_RELEASE_TABLE_CHUNK | 90 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_CREATE | 91 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_DESTROY | 92 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_ENTRY_ADD | 93 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_ENTRY_DELETE | 94 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_NOTIFY_OWNER | 95 | -+-----------------------------------------+-------+ -| ZEBRA_IPSET_ENTRY_NOTIFY_OWNER | 96 | -+-----------------------------------------+-------+ -| ZEBRA_IPTABLE_ADD | 97 | -+-----------------------------------------+-------+ -| ZEBRA_IPTABLE_DELETE | 98 | -+-----------------------------------------+-------+ -| ZEBRA_IPTABLE_NOTIFY_OWNER | 99 | -+-----------------------------------------+-------+ -| ZEBRA_VXLAN_FLOOD_CONTROL | 100 | -+-----------------------------------------+-------+ -| ZEBRA_VXLAN_SG_ADD | 101 | -+-----------------------------------------+-------+ -| ZEBRA_VXLAN_SG_DEL | 102 | -+-----------------------------------------+-------+ -| ZEBRA_VXLAN_SG_REPLAY | 103 | -+-----------------------------------------+-------+ -| ZEBRA_MLAG_PROCESS_UP | 104 | -+-----------------------------------------+-------+ -| ZEBRA_MLAG_PROCESS_DOWN | 105 | -+-----------------------------------------+-------+ -| ZEBRA_MLAG_CLIENT_REGISTER | 106 | -+-----------------------------------------+-------+ -| ZEBRA_MLAG_CLIENT_UNREGISTER | 107 | -+-----------------------------------------+-------+ -| ZEBRA_MLAG_FORWARD_MSG | 108 | -+-----------------------------------------+-------+ -| ZEBRA_NHG_ADD | 109 | -+-----------------------------------------+-------+ -| ZEBRA_NHG_DEL | 110 | -+-----------------------------------------+-------+ -| ZEBRA_NHG_NOTIFY_OWNER | 111 | -+-----------------------------------------+-------+ -| ZEBRA_EVPN_REMOTE_NH_ADD | 112 | -+-----------------------------------------+-------+ -| ZEBRA_EVPN_REMOTE_NH_DEL | 113 | -+-----------------------------------------+-------+ -| ZEBRA_SRV6_LOCATOR_ADD | 114 | -+-----------------------------------------+-------+ -| ZEBRA_SRV6_LOCATOR_DELETE | 115 | -+-----------------------------------------+-------+ -| ZEBRA_SRV6_MANAGER_GET_LOCATOR_CHUNK | 116 | -+-----------------------------------------+-------+ -| ZEBRA_SRV6_MANAGER_RELEASE_LOCATOR_CHUNK| 117 | -+-----------------------------------------+-------+ -| ZEBRA_ERROR | 118 | -+-----------------------------------------+-------+ -| ZEBRA_CLIENT_CAPABILITIES | 119 | -+-----------------------------------------+-------+ -| ZEBRA_OPAQUE_MESSAGE | 120 | -+-----------------------------------------+-------+ -| ZEBRA_OPAQUE_REGISTER | 121 | -+-----------------------------------------+-------+ -| ZEBRA_OPAQUE_UNREGISTER | 122 | -+-----------------------------------------+-------+ -| ZEBRA_NEIGH_DISCOVER | 123 | -+-----------------------------------------+-------+ -| ZEBRA_ROUTE_NOTIFY_REQUEST | 124 | -+-----------------------------------------+-------+ -| ZEBRA_CLIENT_CLOSE_NOTIFY | 125 | -+-----------------------------------------+-------+ -| ZEBRA_NHRP_NEIGH_ADDED | 126 | -+-----------------------------------------+-------+ -| ZEBRA_NHRP_NEIGH_REMOVED | 127 | -+-----------------------------------------+-------+ -| ZEBRA_NHRP_NEIGH_GET | 128 | -+-----------------------------------------+-------+ -| ZEBRA_NHRP_NEIGH_REGISTER | 129 | -+-----------------------------------------+-------+ -| ZEBRA_NHRP_NEIGH_UNREGISTER | 130 | -+-----------------------------------------+-------+ -| ZEBRA_NEIGH_IP_ADD | 131 | -+-----------------------------------------+-------+ -| ZEBRA_NEIGH_IP_DEL | 132 | -+-----------------------------------------+-------+ -| ZEBRA_CONFIGURE_ARP | 133 | -+-----------------------------------------+-------+ -| ZEBRA_GRE_GET | 134 | -+-----------------------------------------+-------+ -| ZEBRA_GRE_UPDATE | 135 | -+-----------------------------------------+-------+ -| ZEBRA_GRE_SOURCE_SET | 136 | -+-----------------------------------------+-------+ -| ZEBRA_TC_QDISC_INSTALL | 137 | -+-----------------------------------------+-------+ -| ZEBRA_TC_QDISC_UNINSTALL | 138 | -+-----------------------------------------+-------+ -| ZEBRA_TC_CLASS_ADD | 139 | -+-----------------------------------------+-------+ -| ZEBRA_TC_CLASS_DELETE | 140 | -+-----------------------------------------+-------+ -| ZEBRA_TC_FILTER_ADD | 141 | -+-----------------------------------------+-------+ -| ZEBRA_TC_FILTER_DELETE | 142 | -+-----------------------------------------+-------+ -| ZEBRA_OPAQUE_NOTIFY | 143 | -+-----------------------------------------+-------+ +The definitions of zebra protocol commands can be found at ``lib/zclient.h``. Dataplane batching ================== @@ -351,7 +351,6 @@ static const struct zebra_desc_table command_types[] = { DESC_ENTRY(ZEBRA_VRF_ADD), DESC_ENTRY(ZEBRA_VRF_DELETE), DESC_ENTRY(ZEBRA_VRF_LABEL), - DESC_ENTRY(ZEBRA_INTERFACE_VRF_UPDATE), DESC_ENTRY(ZEBRA_BFD_CLIENT_REGISTER), DESC_ENTRY(ZEBRA_BFD_CLIENT_DEREGISTER), DESC_ENTRY(ZEBRA_INTERFACE_ENABLE_RADV), diff --git a/lib/zclient.h b/lib/zclient.h index 2a3ce4e48..f18fc056f 100644 --- a/lib/zclient.h +++ b/lib/zclient.h @@ -127,7 +127,6 @@ typedef enum { ZEBRA_VRF_ADD, ZEBRA_VRF_DELETE, ZEBRA_VRF_LABEL, - ZEBRA_INTERFACE_VRF_UPDATE, ZEBRA_BFD_CLIENT_REGISTER, ZEBRA_BFD_CLIENT_DEREGISTER, ZEBRA_INTERFACE_ENABLE_RADV, diff --git a/ospfd/ospf_zebra.c b/ospfd/ospf_zebra.c index abc580b13..1af703d88 100644 --- a/ospfd/ospf_zebra.c +++ b/ospfd/ospf_zebra.c @@ -162,29 +162,6 @@ static int ospf_interface_link_params(ZAPI_CALLBACK_ARGS) return 0; } -/* VRF update for an interface. */ -static int ospf_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp = NULL; - vrf_id_t new_vrf_id; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - if (!ifp) - return 0; - - if (IS_DEBUG_OSPF_EVENT) - zlog_debug( - "%s: Rx Interface %s VRF change vrf_id %u New vrf %s id %u", - __func__, ifp->name, vrf_id, - ospf_vrf_id_to_name(new_vrf_id), new_vrf_id); - - /*if_update(ifp, ifp->name, strlen(ifp->name), new_vrf_id);*/ - if_update_to_new_vrf(ifp, new_vrf_id); - - return 0; -} - /* Nexthop, ifindex, distance and metric information. */ static void ospf_zebra_add_nexthop(struct ospf *ospf, struct ospf_path *path, struct zapi_route *api) @@ -2203,7 +2180,6 @@ static zclient_handler *const ospf_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = ospf_interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = ospf_interface_address_delete, [ZEBRA_INTERFACE_LINK_PARAMS] = ospf_interface_link_params, - [ZEBRA_INTERFACE_VRF_UPDATE] = ospf_interface_vrf_update, [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = ospf_zebra_read_route, [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = ospf_zebra_read_route, diff --git a/pbrd/pbr_zebra.c b/pbrd/pbr_zebra.c index e8a49b317..876f9e19e 100644 --- a/pbrd/pbr_zebra.c +++ b/pbrd/pbr_zebra.c @@ -129,29 +129,6 @@ int pbr_ifp_down(struct interface *ifp) return 0; } -static int interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t new_vrf_id; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - - if (!ifp) { - DEBUGD(&pbr_dbg_zebra, "%s: VRF change interface not found", - __func__); - - return 0; - } - - DEBUGD(&pbr_dbg_zebra, "%s: %s VRF change %u -> %u", __func__, - ifp->name, vrf_id, new_vrf_id); - - if_update_to_new_vrf(ifp, new_vrf_id); - - return 0; -} - static int route_notify_owner(ZAPI_CALLBACK_ARGS) { struct prefix p; @@ -436,7 +413,6 @@ extern struct zebra_privs_t pbr_privs; static zclient_handler *const pbr_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = interface_address_delete, - [ZEBRA_INTERFACE_VRF_UPDATE] = interface_vrf_update, [ZEBRA_ROUTE_NOTIFY_OWNER] = route_notify_owner, [ZEBRA_RULE_NOTIFY_OWNER] = rule_notify_owner, [ZEBRA_NEXTHOP_UPDATE] = pbr_zebra_nexthop_update, diff --git a/pimd/pim_zebra.c b/pimd/pim_zebra.c index 92dcbf9d1..62f00dbf8 100644 --- a/pimd/pim_zebra.c +++ b/pimd/pim_zebra.c @@ -51,39 +51,6 @@ static int pim_router_id_update_zebra(ZAPI_CALLBACK_ARGS) return 0; } -static int pim_zebra_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t new_vrf_id; - struct pim_instance *pim; - struct pim_interface *pim_ifp; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - if (!ifp) - return 0; - - if (PIM_DEBUG_ZEBRA) - zlog_debug("%s: %s updating from %u to %u", __func__, ifp->name, - vrf_id, new_vrf_id); - - pim = pim_get_pim_instance(new_vrf_id); - if (!pim) - return 0; - - if_update_to_new_vrf(ifp, new_vrf_id); - - pim_ifp = ifp->info; - if (!pim_ifp) - return 0; - - pim_ifp->pim->mcast_if_count--; - pim_ifp->pim = pim; - pim_ifp->pim->mcast_if_count++; - - return 0; -} - #ifdef PIM_DEBUG_IFADDR_DUMP static void dump_if_address(struct interface *ifp) { @@ -463,7 +430,6 @@ static zclient_handler *const pim_handlers[] = { [ZEBRA_NEXTHOP_UPDATE] = pim_parse_nexthop_update, [ZEBRA_ROUTER_ID_UPDATE] = pim_router_id_update_zebra, - [ZEBRA_INTERFACE_VRF_UPDATE] = pim_zebra_interface_vrf_update, #if PIM_IPV == 4 [ZEBRA_VXLAN_SG_ADD] = pim_zebra_vxlan_sg_proc, diff --git a/ripd/rip_interface.c b/ripd/rip_interface.c index b58015a67..505290ed3 100644 --- a/ripd/rip_interface.c +++ b/ripd/rip_interface.c @@ -383,31 +383,6 @@ static int rip_ifp_destroy(struct interface *ifp) return 0; } -/* VRF update for an interface. */ -int rip_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t new_vrf_id; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - if (!ifp) - return 0; - - if (IS_RIP_DEBUG_ZEBRA) { - struct vrf *nvrf = vrf_lookup_by_id(new_vrf_id); - - zlog_debug("interface %s VRF change vrf %s(%u) new vrf %s(%u)", - ifp->name, ifp->vrf->name, vrf_id, VRF_LOGNAME(nvrf), - new_vrf_id); - } - - if_update_to_new_vrf(ifp, new_vrf_id); - rip_interface_sync(ifp); - - return 0; -} - static void rip_interface_clean(struct rip_interface *ri) { ri->enable_network = 0; diff --git a/ripd/rip_zebra.c b/ripd/rip_zebra.c index 5bf51c2f1..36b58cb20 100644 --- a/ripd/rip_zebra.c +++ b/ripd/rip_zebra.c @@ -222,7 +222,6 @@ static void rip_zebra_connected(struct zclient *zclient) zclient_handler *const rip_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = rip_interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = rip_interface_address_delete, - [ZEBRA_INTERFACE_VRF_UPDATE] = rip_interface_vrf_update, [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = rip_zebra_read_route, [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = rip_zebra_read_route, }; diff --git a/ripngd/ripng_interface.c b/ripngd/ripng_interface.c index a37cb7d09..4cb4bb5ef 100644 --- a/ripngd/ripng_interface.c +++ b/ripngd/ripng_interface.c @@ -264,31 +264,6 @@ static int ripng_ifp_destroy(struct interface *ifp) return 0; } -/* VRF update for an interface. */ -int ripng_interface_vrf_update(ZAPI_CALLBACK_ARGS) -{ - struct interface *ifp; - vrf_id_t new_vrf_id; - - ifp = zebra_interface_vrf_update_read(zclient->ibuf, vrf_id, - &new_vrf_id); - if (!ifp) - return 0; - - if (IS_RIPNG_DEBUG_ZEBRA) { - struct vrf *nvrf = vrf_lookup_by_id(new_vrf_id); - - zlog_debug("interface %s VRF change vrf %s(%u) new vrf %s(%u)", - ifp->name, ifp->vrf->name, vrf_id, VRF_LOGNAME(nvrf), - new_vrf_id); - } - - if_update_to_new_vrf(ifp, new_vrf_id); - ripng_interface_sync(ifp); - - return 0; -} - void ripng_interface_clean(struct ripng *ripng) { struct interface *ifp; diff --git a/ripngd/ripng_zebra.c b/ripngd/ripng_zebra.c index 49b8a197a..bb5a880c0 100644 --- a/ripngd/ripng_zebra.c +++ b/ripngd/ripng_zebra.c @@ -222,7 +222,6 @@ static void ripng_zebra_connected(struct zclient *zclient) static zclient_handler *const ripng_handlers[] = { [ZEBRA_INTERFACE_ADDRESS_ADD] = ripng_interface_address_add, [ZEBRA_INTERFACE_ADDRESS_DELETE] = ripng_interface_address_delete, - [ZEBRA_INTERFACE_VRF_UPDATE] = ripng_interface_vrf_update, [ZEBRA_REDISTRIBUTE_ROUTE_ADD] = ripng_zebra_read_route, [ZEBRA_REDISTRIBUTE_ROUTE_DEL] = ripng_zebra_read_route, }; diff --git a/ripngd/ripngd.h b/ripngd/ripngd.h index c7468b631..3a2bc0c9d 100644 --- a/ripngd/ripngd.h +++ b/ripngd/ripngd.h @@ -413,7 +413,6 @@ extern int ripng_interface_add(ZAPI_CALLBACK_ARGS); extern int ripng_interface_delete(ZAPI_CALLBACK_ARGS); extern int ripng_interface_address_add(ZAPI_CALLBACK_ARGS); extern int ripng_interface_address_delete(ZAPI_CALLBACK_ARGS); -extern int ripng_interface_vrf_update(ZAPI_CALLBACK_ARGS); extern void ripng_interface_sync(struct interface *ifp); extern struct ripng *ripng_lookup_by_vrf_id(vrf_id_t vrf_id); diff --git a/zebra/interface.c b/zebra/interface.c index 92ae8a9dc..919cd11bc 100644 --- a/zebra/interface.c +++ b/zebra/interface.c @@ -853,7 +853,7 @@ void if_handle_vrf_change(struct interface *ifp, vrf_id_t vrf_id) if_down_del_nbr_connected(ifp); /* Send out notification on interface VRF change. */ - /* This is to issue an UPDATE or a DELETE, as appropriate. */ + /* This is to issue a DELETE, as appropriate. */ zebra_interface_vrf_update_del(ifp, vrf_id); if (if_is_vrf(ifp)) diff --git a/zebra/redistribute.c b/zebra/redistribute.c index 7aa254b1c..463c903da 100644 --- a/zebra/redistribute.c +++ b/zebra/redistribute.c @@ -592,9 +592,8 @@ void zebra_interface_vrf_update_del(struct interface *ifp, vrf_id_t new_vrf_id) struct zserv *client; if (IS_ZEBRA_DEBUG_EVENT) - zlog_debug( - "MESSAGE: ZEBRA_INTERFACE_VRF_UPDATE/DEL %s VRF Id %u -> %u", - ifp->name, ifp->vrf->vrf_id, new_vrf_id); + zlog_debug("MESSAGE: ZEBRA_INTERFACE_DELETE %s VRF Id %u -> %u", + ifp->name, ifp->vrf->vrf_id, new_vrf_id); for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { /* Do not send unsolicited messages to synchronous clients. */ @@ -606,7 +605,6 @@ void zebra_interface_vrf_update_del(struct interface *ifp, vrf_id_t new_vrf_id) zsend_interface_update(ZEBRA_INTERFACE_DOWN, client, ifp); client->ifdel_cnt++; zsend_interface_delete(client, ifp); - zsend_interface_vrf_update(client, ifp, new_vrf_id); } } @@ -619,9 +617,8 @@ void zebra_interface_vrf_update_add(struct interface *ifp, vrf_id_t old_vrf_id) struct zserv *client; if (IS_ZEBRA_DEBUG_EVENT) - zlog_debug( - "MESSAGE: ZEBRA_INTERFACE_VRF_UPDATE/ADD %s VRF Id %u -> %u", - ifp->name, old_vrf_id, ifp->vrf->vrf_id); + zlog_debug("MESSAGE: ZEBRA_INTERFACE_ADD %s VRF Id %u -> %u", + ifp->name, old_vrf_id, ifp->vrf->vrf_id); for (ALL_LIST_ELEMENTS(zrouter.client_list, node, nnode, client)) { /* Do not send unsolicited messages to synchronous clients. */ diff --git a/zebra/zapi_msg.c b/zebra/zapi_msg.c index 86e4f2570..859687b98 100644 --- a/zebra/zapi_msg.c +++ b/zebra/zapi_msg.c @@ -435,27 +435,6 @@ int zsend_interface_addresses(struct zserv *client, struct interface *ifp) return 0; } -/* Notify client about interface moving from one VRF to another. - * Whether client is interested in old and new VRF is checked by caller. - */ -int zsend_interface_vrf_update(struct zserv *client, struct interface *ifp, - vrf_id_t vrf_id) -{ - struct stream *s = stream_new(ZEBRA_MAX_PACKET_SIZ); - - zclient_create_header(s, ZEBRA_INTERFACE_VRF_UPDATE, ifp->vrf->vrf_id); - - /* Fill in the name of the interface and its new VRF (id) */ - stream_put(s, ifp->name, INTERFACE_NAMSIZ); - stream_putl(s, vrf_id); - - /* Write packet size. */ - stream_putw_at(s, 0, stream_get_endp(s)); - - client->if_vrfchg_cnt++; - return zserv_send_message(client, s); -} - /* Add new nbr connected IPv6 address */ void nbr_connected_add_ipv6(struct interface *ifp, struct in6_addr *address) { diff --git a/zebra/zapi_msg.h b/zebra/zapi_msg.h index ce8e15446..a01cbf675 100644 --- a/zebra/zapi_msg.h +++ b/zebra/zapi_msg.h @@ -57,8 +57,6 @@ extern int zsend_redistribute_route(int cmd, struct zserv *zclient, extern int zsend_router_id_update(struct zserv *zclient, afi_t afi, struct prefix *p, vrf_id_t vrf_id); -extern int zsend_interface_vrf_update(struct zserv *zclient, - struct interface *ifp, vrf_id_t vrf_id); extern int zsend_interface_link_params(struct zserv *zclient, struct interface *ifp); extern int zsend_pw_update(struct zserv *client, struct zebra_pw *pw); |