diff options
Diffstat (limited to 'zebra/kernel_socket.c')
| -rw-r--r-- | zebra/kernel_socket.c | 45 |
1 files changed, 30 insertions, 15 deletions
diff --git a/zebra/kernel_socket.c b/zebra/kernel_socket.c index 2741a23242..e76d8c0cc4 100644 --- a/zebra/kernel_socket.c +++ b/zebra/kernel_socket.c @@ -534,7 +534,7 @@ int ifm_read(struct if_msghdr *ifm) /* paranoia: sanity check structure */ if (ifm->ifm_msglen < sizeof(struct if_msghdr)) { flog_err(EC_ZEBRA_NETLINK_LENGTH_ERROR, - "ifm_read: ifm->ifm_msglen %d too short", + "%s: ifm->ifm_msglen %d too short", __func__, ifm->ifm_msglen); return -1; } @@ -1112,14 +1112,6 @@ void rtm_read(struct rt_msghdr *rtm) } else return; - /* - * CHANGE: delete the old prefix, we have no further information - * to specify the route really - */ - if (rtm->rtm_type == RTM_CHANGE) - rib_delete(afi, SAFI_UNICAST, VRF_DEFAULT, ZEBRA_ROUTE_KERNEL, - 0, zebra_flags, &p, NULL, NULL, 0, RT_TABLE_MAIN, 0, - 0, true); if (rtm->rtm_type == RTM_GET || rtm->rtm_type == RTM_ADD || rtm->rtm_type == RTM_CHANGE) rib_add(afi, SAFI_UNICAST, VRF_DEFAULT, proto, 0, zebra_flags, @@ -1396,9 +1388,8 @@ static void kernel_read(struct thread *thread) * can assume they have the whole message. */ if (rtm->rtm_msglen != nbytes) { - zlog_debug( - "kernel_read: rtm->rtm_msglen %d, nbytes %d, type %d", - rtm->rtm_msglen, nbytes, rtm->rtm_type); + zlog_debug("%s: rtm->rtm_msglen %d, nbytes %d, type %d", + __func__, rtm->rtm_msglen, nbytes, rtm->rtm_type); return; } @@ -1529,7 +1520,7 @@ void kernel_update_multi(struct dplane_ctx_q *ctx_list) { struct zebra_dplane_ctx *ctx; struct dplane_ctx_q handled_list; - enum zebra_dplane_result res; + enum zebra_dplane_result res = ZEBRA_DPLANE_REQUEST_SUCCESS; TAILQ_INIT(&handled_list); @@ -1603,6 +1594,12 @@ void kernel_update_multi(struct dplane_ctx_q *ctx_list) res = kernel_intf_update(ctx); break; + case DPLANE_OP_TC_INSTALL: + case DPLANE_OP_TC_UPDATE: + case DPLANE_OP_TC_DELETE: + res = kernel_tc_update(ctx); + break; + /* Ignore 'notifications' - no-op */ case DPLANE_OP_SYS_ROUTE_ADD: case DPLANE_OP_SYS_ROUTE_DELETE: @@ -1611,9 +1608,27 @@ void kernel_update_multi(struct dplane_ctx_q *ctx_list) res = ZEBRA_DPLANE_REQUEST_SUCCESS; break; - default: - res = ZEBRA_DPLANE_REQUEST_FAILURE; + case DPLANE_OP_INTF_NETCONFIG: + res = kernel_intf_netconf_update(ctx); break; + + case DPLANE_OP_NONE: + case DPLANE_OP_BR_PORT_UPDATE: + case DPLANE_OP_IPTABLE_ADD: + case DPLANE_OP_IPTABLE_DELETE: + case DPLANE_OP_IPSET_ADD: + case DPLANE_OP_IPSET_DELETE: + case DPLANE_OP_IPSET_ENTRY_ADD: + case DPLANE_OP_IPSET_ENTRY_DELETE: + case DPLANE_OP_NEIGH_IP_INSTALL: + case DPLANE_OP_NEIGH_IP_DELETE: + case DPLANE_OP_NEIGH_TABLE_UPDATE: + case DPLANE_OP_GRE_SET: + case DPLANE_OP_INTF_ADDR_ADD: + case DPLANE_OP_INTF_ADDR_DEL: + zlog_err("Unhandled dplane data for %s", + dplane_op2str(dplane_ctx_get_op(ctx))); + res = ZEBRA_DPLANE_REQUEST_FAILURE; } skip_one: |
